Mobile app version of vmapp.org
Login or Join
Deb1703797

: 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

@Deb1703797

Posted in: #GoogleAnalytics #GoogleTagManager

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

1 Comments

Sorted by latest first Latest Oldest Best

 

@Connie744

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme