en:user_advanced:google_analytics
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:user_advanced:google_analytics [2018/08/06 21:25] – kjdon | en:user_advanced:google_analytics [2023/03/13 01:46] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | |||
| + | |||
| ====== Using Google Analytics ====== | ====== Using Google Analytics ====== | ||
| Line 28: | Line 31: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | If you are writing this into XSLT file, you need to format it like this: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <!-- Global site tag (gtag.js) - Google Analytics --> | ||
| + | <script async=" | ||
| + | < | ||
| + | < | ||
| + | window.dataLayer = window.dataLayer || []; | ||
| + | function gtag(){dataLayer.push(arguments); | ||
| + | gtag(' | ||
| + | | ||
| + | gtag(' | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Adding and using new servlet params ===== | ||
| + | |||
| + | To make this work I have modified the java code to store any initParams mentioned in the servlet definition (in servlets.xml) in the config_params HashMap. This gets passed to the transformer when it does the page transformation, | ||
| + | < | ||
| + | |||
| + | < | ||
| + | <!-- some global parameters - these are set by whoever is invoking the transformation | ||
| + | Any servlet init parameters can be accessed by adding a param here--> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | |||
| + | </ | ||
| + | |||
| + | Now that this has been implemented, | ||
| + | |||
| + | In web/ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | You will need to restart the server for this to take effect. | ||
en/user_advanced/google_analytics.1533590724.txt.gz · Last modified: 2018/08/06 21:25 by kjdon
