- πΊπΈUnited States japerry KVUO
With the sunset of legacy google analytics, the 8.x-3.x module is now unsupported. If this is still an issue with the 4.x version, please file a new issue in the queue.
Based on Matomo issue: #2948060: Implement twig template for tracking code customization β - thanks to the author @pfrenssen!
We would like to be able to customize the Javascript code that is generated by the module. There can be many use cases for wanting to override the JS, but we want to achieve the following:
&enableLinkTracking
), instead of '(i[r].q=i[r].q||[]).push(['enableLinkTracking])
.
Currently the generation of the JS is performed in hardcoded PHP code in google_analytics_page_attachments()
. Refactor this to use a twig template instead, so we can use preprocessors to alter existing parameters, as well as override the template in case more drastic changes are needed. We can move much of the logic to a preprocess function, and put the if/else switches in the Twig template itself.
Discuss if this is would be useful and wanted in the Google Analytics project.
None.
None. The output for existing users would remain exactly the same, but it will be overridable if needed.
None.
Closed: outdated
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
With the sunset of legacy google analytics, the 8.x-3.x module is now unsupported. If this is still an issue with the 4.x version, please file a new issue in the queue.