Tracking pdf downloads
-
hello,
I have a site with 100's of pdf's for download and I would like to track how many people are downloading these, does anyone have a simple solution for this?
Is there anyway I can do this in Google Analytics using one piece of code, thanks...
-
Hi Guys thank you to all for your help on this topic It's very much appreciated, cheers...
-
For hundreds of files you might want to consider these Ga hacks: Brian Clifton's GA add-ons http://www.advanced-web-metrics.com/blog/free-to-use-plugins/ There is another by Stephane Hamel http://gaAddons.com/ Both will do the job...
-
install piwik it will tell you how many times that url with the pdf was downloaded, also awstats which usually comes standard on cpanel will tell you the number of downloads.
-
You could use some jQuery to pull the name of the file into the trackPageview GA call from the href, that would automate populating it anyway. If href contains pdf, onClick is now this, etc.
-
One method would be to use the logs on your server. If you're using IIS for example, every time a pdf was downloaded or viewed, this would be stored in the IIS Logs. It would normally show the time, date and IP address that viewed the pdf file.
You can get software to analyse these logs here;
http://www.iis.net/community/default.aspx?tabid=34&i=1864&g=6
Otherwise instead of linking directly to your pdf in your website, you could point the link to anther html page, which then in turn opens/downloads the pdf. You could then put the Google Analytics tracking code in this html page and then you would be able to track how many time that page was viewed in analytics (and therefore how many times the pdf was viewed).
The html page would just need to contain a simple redirect to the pdf, eg.
<title>Your Page Title</title>
Optional page text here.
You would also need to insert your analytics tracking code in the section.
Hope this helps.
-
You want to track individual pdfs?
Off the top of my head adding ="javascript: pageTracker._trackPageview('/spoofpage')>anchor text will spoof a page view to your spoofpage in analytics.
That will require individually tagging each pdf though.
Let me have a think if there's anyway to change the 'spoofpage' to the href 'url' to allow you to add the same code to each.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Tracking links and duplicate content
Hi all, I have a bit of a conundrum for you all pertaining to a tracking link issue I have run into on a clients site. They currently have over duplicate content. Currently, they have over 15,000 pages being crawled (using Screaming Frog) but only 7,000+ are legitimate pages in the sense of they are not duplicates of themselves. The client is using Omniture instead of Google Analytics and using an advanced tracking system on their site for internal and external links (ictids and ectids) in the URL parameters. This is creating thousands of duplicated pages being crawled by Google (as seen on their Search Console and on Screaming Frog). They also are in the middle of moving over from http to https and have thousands of pages currently set up for both, again, creating a duplicate content issue. What I have suggested for the tracking links is setting up a URL parameter in Search Console for these tracking links. I've also suggested they canonical all tracking links to point to the clean page so the pages that have already been indexed point to the correct clean url. Does this seam like the appropriate strategy? Additionally, I've told them before they submit a new sitemap to Google, they need to switch their website over to https to avoid worsening their duplicate content issue. They have not submitted a sitemap to Google Search Console since March 2015. Thank you for any help you can offer!
Reporting & Analytics | | Rydch410 -
Is It Possible to have Cross Domain Tracking on Two Different Accounts?
Good afternoon to all, I have this kind of dilemma regarding setting up tracking code on two different accounts, namely bioglass.com with GA Code UA-12345678-1 where all the product information has been listed and shopbioglass.com with GA Code UA-87654321-1 where the prices are located and transaction takes place. Both of them are connected since if you click the buy button on bioglass.com for a specific product, it will automatically redirect to shopbioglass.com where the prices and transactions comes into place. Dilemma: I want to check how many conversion took place from bioglass.com to shopbioglass.com. I know they have different GA Code but is it possible for me to have a cross domain tracking for this?? What are the possible remedies if not? Thanks to all 🙂
Reporting & Analytics | | TWSOM0 -
E Commerce and cross domain tracking on universal analytics?
Hi Mozzers, I am running into an issue where my client's website ( can refer to domain.com) uses a third party checkout site called rezovation that we can refer to checkout.rezovation.com: I went through this doc here https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain and https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce (for universal analytics) and I still find it confusing so here are my questions: According to my understanding I need a customized GATC to link both domains checkout.rezovation.com and domain.com? If yes(above), do we setup one customized GATC for cross domain tracking on all pages from checkout.rezovation.com and domain.com? if it is the case can someone provide detail steps on how to set it up ( I am not a coder so the easier the guideline, the better) Once cross domain tracking is set up, e commerce tracking code should be only on thank you page should be looking like the image below? Should i add manually all the extra code for the ecommerce tracking code or I can get it done via a third party website? Thank you guys! oPgn8P4.png
Reporting & Analytics | | Ideas-Money-Art0 -
URL String Tracking Question--Need help!
I am doing some research for a freelance project and found a URL receiving a decent amount of traffic from search with this url string after the normal page url (xxx.com/credit-card-counseling.aspx?match=e&query=debthelper.com&id=22097628847&id=1810807655) Is this some sort of GA tracking code? Why would it be used on that page to track organic search hits if that happens automatically? Would love some help figuring this out! Thanks,
Reporting & Analytics | | RickyShockley0 -
Magento and Analytics - Unique purchases tracking
Hi guys, My ecommerce site is on Magento and in order to integrate it with Google Analytics, I enter my GA account number on the Account Number field in the backend. What surprises me is that some purchases are not tracked at all. So for the month of may GA shows X unique purchases when Magento shows x+5. Can this occur because the customer leaves the site before the confirmation page is shown? Thanks. Regards
Reporting & Analytics | | footd0 -
Where should I insert the code when I track an event on GA?
hi mozzers, I am trying to setup my first event to count the numbers of downloads of an infographic(pdf file) we just created on GA and after some research I figured that I should add this piece of code (below) but where exactly? <colgroup><col width="386"></colgroup>
Reporting & Analytics | | Ideas-Money-Art
| _gaq.push(['_trackevent', 'PDF', 'Download', 'name of file']); | Should I put it just in between _gaq.push(['_setDomainName', 'coit.com']); and _gaq.push(['_trackPageview']); ? Please provide details because I ve never done this before Thanks 🙂0 -
Tracking Multiple Top Level Domains in GA
Hi, I am setting up Google Analytics for www.example.co.uk and www.example.ie Is this as simple as just adding GA tracking code 'track Multiple top-level domains'? With this method how can I distinguish between each site's incoming traffic? Do filters needed to be created? Thanks in advance 🙂
Reporting & Analytics | | daracreative0 -
Multiple Domain Tracking with One Google Analytics Account
I am working on multiple online retail stores as follow. Right now, I have tracking facility with multiple account. Attached image can give you more idea about it. http://www.vistastores.com/
Reporting & Analytics | | CommercePundit
http://www.lampslightingandmore.com/
http://www.vistapatioumbrellas.com/ I don't want to track my statistics with multiple account. Because, it may take too much time behind Goal set up as well as analysis. Can I track all data under one account for all online retail stores? 6464019053_bda32e9fe0_b.jpg0