: Tracking PDF clicks that are also exits I followed these instructions to use Google Tag Manager to track PDF downloads without having to manually add an onClick to every PDF link on our site
I followed these instructions to use Google Tag Manager to track PDF downloads without having to manually add an onClick to every PDF link on our site and it is now tracking PDF downloads reliably. However, our PDFs are stored on a static asset server, not on the Drupal server, so each PDF download is also an exit. In the analytics, PDF downloads are showing up as relative to the root of the Drupal server: instead of
staticserver/file.pdf
they show up as
mainserver/http://staticserver/file.pdf
Step 5 in the howto linked above doesn't appear to address this issue (or else I'm mis-reading it). How can I get analytics to recognize that these clicks lead to a different host and are not relative to the root of the main server?
More posts by @Deb1703797
1 Comments
Sorted by latest first Latest Oldest Best
In GA reports, your homepage will probably be '/', and 'www.mysite.com/page1' will come out as '/page1'.
This is because Google Analytics usually keeps the primary domain in a different dimension, 'Hostname'.
The issue here is that you're sending the Page View from one domain, and claiming that it comes from another.
In a similar manner to the 'page' and 'title' fields, you can edit the 'hostname' field in the Fields to Set area of GTM.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.