Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to add some ecommerce stuff to the javascript tracker but as i can see there is no way to modify the generated piwik script of your module?
If this is correct - this could be changed into a feature request. I guess it could be useful to have a hook_alter() before "add tracker code to scope".
Comments
Comment #1
hass CreditAttribution: hass commentedLook into ubercart module. It has an integration with google analytics. You should be able to use the same way in piwik.
You can help on #231451: Add hook to alter data before sending it to browser.
Comment #2
marcusx CreditAttribution: marcusx commentedI once needed to trac a special button click to an external page as a goal and ended up with this quick solution.
Comment #3
checker CreditAttribution: checker commentedI have an easy solution for my problem to add an ecommerce order. Just add the javascript code inline with a higher weight than piwik javascript.
It should look like this: