AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.4K members online now
1.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Tracking Clicks to a File from External Email

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I have a file download link in an external email that I would like to track traffic to. The file is hosted within my domain, but it is a file nonetheless.


How do I track clicks on the file link if the link is in an external email?

Thanks!Smiley Happy


Tracking Clicks to a File from External Email

Explorer ✭ ✭ ✭
# 2
Explorer ✭ ✭ ✭

Hi @Shagun R,

You can use utms to tag the link for download. So that the users get tracked on landing on your website.

Check here:

Hope this helps,

Re: Tracking Clicks to a File from External Email

Participant ✭ ☆ ☆
# 3
Participant ✭ ☆ ☆

Basically clicking links to file could not be tracked becasue of there is no way to call an analytics script on the way from email to file. But you can handle it with some workaround.

You could have an empty page on your server e.g. 'file_clicked.html'.

On this page you can call ga script with hitcallback function that redirects user to target file:

ga('create', 'UA-XXXXX-Y', 'auto');

ga('send', 'pageview', {
      hitCallback: function() {
          document.location = 'target_file.pdf';

In this way when you use link to file_clicked.html in your email and it will be clicked analytics will track a visit to file_clicked page and then script will send user to target file. And you can use utm tracking with link to file_clicked.html