How to track direct file downloads in google analytics






















Can you track the download button in the PDF file? Usually, people refer to this button that is available when you open a PDF file in the browser like Google Chrome :. Unfortunately, the answer to this question is no. You cannot track that because you are now viewing the PDF file directly in a browser and you cannot place tracking codes in these files.

Once you get a grasp on the main concepts, like triggers, tags, variables, you should be up-and-running fairly quickly. Every time a file link is clicked, the trigger will be activated and the GA tag will be fired. If file links on your site do not contain file names or extensions, you should cooperate with a developer:. This is so helpful, thank you!! I really appreciate how you walked through the very very basic beginner steps as well. Any idea how to track direct links to a PDF file?

Everything above makes sense from a link click perspective, but how would you handle someone taking your PDF link and posting it online and then as a website owner, knowing how many people not only see the PDF from link clicks, but also from direct traffic? Super helpful. I'm applying for jobs and have a resume link on my website-now I can see how often it has been clicked.

Thank you so much for this really clear explanation! I've not used GTM before and was quite confused about how to go about tracking downloads and getting it hooked up properly with Google Analytics.

With your super clear step-by-step guide I've now got it up and running in no time. I really appreciate the effort you've put into this. I was wondering. Why did you choose page url as a label and not the click label? Also what is the use of the delay and page path condition? Just curious :. If you click a link and then the user is redirected, GA might not have enough time to send the data if PDF is opened in the same window.

If you want to give it more time to send the data, you can use Wait for tags. This applies not only to GA tags but to all tags. Yes I saw, I think you misunderstoond me. Why would you use page path and not the 'click text'? The page path can always be found since it's recorded when the event is triggered.

The click text most times has a better name to recognize what has been clicked :. Thanks for the answer. Would you say: no harm, no foul? This is up to you. I just showed an example. If I wanted to create a goal based on a click of particular URL just on the particular page, then Page Path would be useful. To sum up: your naming convention depends on your needs. Imagine delaying every link click for up to 2 seconds.

For more information, visit the Angelfish Software website. Skip to content Hidden. Fortunately there are a few ways you can configure Google Analytics to track file downloads.

With this in mind I decided to come up with a simple solution that only requires a single line to be included in your header section for it to track page views and download events. The below snippet assumes you have migrated to Universal Analytics analytics.

You should be familiar with the first part of this excerpt as it is your standard Google Analytics tracking code, but the part which I have added is the ' window. Normally to track download events, Google recommends that you fix the following tracking code to each of your anchor links:. The above code will call the ' ga ' function when you click on the link and track the event before the download commences - this is the same approach that I have used, except I have automated it using JavaScript so you don't need to manually ensure this code is attached to all your links.

We configure the plugin to insert the following line in the header section of all our pages:. You also have the advantage with this simple approach of manually adding the above code to bottom of the 'head' section of any non-WordPress pages to enable tracking.

But, we are still changing the user experience because we are changing the 'target' attribute. If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages. Ruslan Konygin. Table of contents Introduction Why do you need file downloads tracking in Google Analytics?

What is Google Tag Manager? Write a Comment Cancel reply. Facebook LinkedIn. Powered by GDPR plugin. Privacy Overview Effective Date: July 21, Our privacy policy explains how we collect, use, share and protect your personal information. How to contact us: Email: ceo triodox. Contact form When you use the contact form on our website, we collect the following information with the purpose to identify you and to be able to contact you back: First name and last name Email address Newsletter form When you use our newsletter form, we collect your email address with the purpose to be able to provide you with our newsletters as requested by you when providing your consent for receiving such information from us.

Leave a reply form The Wordpress platform on which our website is built has the ability comments to be posted under blog posts. If you decide to use this functionality we will collect the following information from you with the purpose to avoid spam in the comments section and to avoid one person to leave several comments like it is from several people: First name and last name Email address We also use tools like Google Analytics on our website with the purpose to measure traffic to our site and how users interact with our site as we use this information to improve our services.

What are the legal basis for the collection and the processing of the data? Our legal basis for the processing of your data collected when you use our contact form, leave a reply form and newsletter form is your consent provided when you voluntarily decided to contact us, to leave a reply or to subscribe for our newsletter.

Your consent was expressed via your actions when you entered your personal data in the required fields. The personal data requested in these forms is required to be provided in order you to be able to use these functionalities. If you are an existing customer, we may contact you with information about goods and services similar to those which were the subject of a previous sale to you on the grounds of our Legitimate Business Interests.

We may use our Legitimate Business Interests to measure traffic to our site and to follow how users interact with our site. You will find out what legal basis, we apply for the use of cookies in the relevant section. With whom we share your personal data? We do not share your personal information with others except as indicated within this policy.

We may share your information in the following ways: With third party service providers, agents, or contractors that are performing or may perform services on our behalf or to assist us with providing services to you.

The Google Analytics opt-out browser add-on provides visitors with the ability to prevent their data from being collected and used by Google Analytics.

For how long we will store your personal data? Your rights under the General Data Protection Regulation GDPR Your rights as a data subject are the following: Right of access — you have the right to request a copy of the information that we hold about you.

Right of rectification — you have a right to correct data that we hold about you that is inaccurate or incomplete. Right to be forgotten — in certain circumstances you can ask for the data we hold about you to be erased from our records. Right to restriction of processing — where certain conditions apply you have a right to restrict the processing.



0コメント