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
-
Cross-domain / subdomain tracking in GA?
Hi there, My client has a site website.com and a booking engine, booking.website.com They are currently tracking the main site and the booking subdomain as two separate properties in the same GA account. The issue is we can't see where users are originating on the subdomain property; it's all being counted as referral. My understanding is we need to set up subdomain tracking using Google Tag Manager in order for GA to pass the user data between the two subdomains. This is fine, except for this one line I am reading on Google's guide to cross-domain tracking: Subdomains If you have updated your tracking code to analytics.js, then no additional configuration is required to track subdomains. You can use cross domain tracking to collect data from a primary domain, like www.example.com, and a subdomain, like www.subdomain.example.com, in a single Analytics account property. That last line makes it sound like we should be using cross-domain tracking for this purpose. Are we correct in setting up subdomain tracking and NOT cross-domain tracking to be able to track users across subdomains on the same domain?
Reporting & Analytics | | FPD_NYC0 -
Google Analytics Stopped Tracking Visits - NEED HELP!
Hi Moz Community, I have about 10 sites, static HTML sites and WordPress sites, which ALL stopped tracking Google Analytics on August 2nd. They go to a flat-line! Dead! No data! Has anyone else experienced this either currently or before? I have confirmed all code is correct as it's been tracking these sites for years. One site gets 5,000+ visits a month and they are sitting at only 1,500 now and will be a fun conversation to have with the client. If all code is correct, what should I do? How do I overcome this without having to re-create another account/tracking ID? Never dealt with something like this before and there is not much on the web or in other forums. Would appreciate any help or advice or tips! - Patrick
Reporting & Analytics | | WhiteboardCreations0 -
Goal Tracking In Analytics On Separate Ordering Website
I have a question for any Google Analytics wizards out there. We have two clients that have a similar complication when it comes to tracking goal conversions in Analytics. Basically, all the conversion actions we want to track occur on a separate website; either an iframe embedded on the page or through an entirely different ordering website. Trick is, Analytics sees the source for all these conversions as referrals from the main site. We'd like to get visibility back to the original source/medium that brought visitors to the site before they converted. Anyone have a suggestion for making that happen?
Reporting & Analytics | | fivefifty0 -
Tracking time spent on a section of a website in Google Analytics
Hi, I've been asked by a client to track time spent or number of pages visited on a specific section of their website using Google Analytics but can't see how to do this. For example, they have a "golf" section within their site and want to measure how many people either visit 5 page or more within the golf section or spend at least 6 minutes browsing the various golf section pages. Can anyone advise how if this can be done, and if so, how I go about it. Thanks
Reporting & Analytics | | geckonm0 -
Tracking repeat buyers Universal Analytics
Hi there, I want to track the repeat buyers on my ecommerce. In order to do that, I am going to create a custom dimension on Analytics. The custom dimension will be called "repeat_buyers" with scope user because I want to track the user over time. Is my assumption correct? How would you you set it up? When I have this dimension, I would just apply the default metric transaction on my reports. I don't have experiencie on custom dimensions so I might be totally wrong. Can you please help? Thanks and regards
Reporting & Analytics | | footd0 -
Goal tracking in Google Analytics
Hi folks I read from various sources that if you setup goals in Google Analytics each of these goals can only be fulfilled once per visit. Also some sources suggesting that only one goal from each goal group can be fulfilled per visit. On our site we have a goal for external links since this provides value to partners. Some users do open an external link in a new tab, then come back to the main site. Any further goal completions would then not get tracked. Since we apply a result based payment model for our work this means we are literally loosing money. Anyone has official info from Google on this? Can it be configured? How long is a visit? Thanks a million and have a great day. Fredrik
Reporting & Analytics | | Resultify0 -
GA stopped tracking traffic, suddenly, why¿? :-/
2 days ago GA stopped receiving data. It only stopped for one account of all my projects. At this moment there are 5 persons navigating the site and these days there where numerous visitors as they contacted the support team thru the site. GA says that it's receiving the code, hw, I checked it twice. The tracking code is located below the footer, in the body. It was there for few years.... I also checked if there is some js conflict, negative. Is there something that could make the tracking to stop? Does anybody experienced similar problems¿? Should I be worried...¿? (and with SEOmoz server with issues not sure when will see new results.......) EDIT: In Web Master Tools I see results for indexing, with yesterday date, so I assume that the site crawling is ok and must be GA issue.
Reporting & Analytics | | MilosMilcom0 -
Tracking Subdomains without access to Primary Domain
Hi, I have look after mutliple sub domains on a website and want to implement GA sub domain tracking across them. I do not have however have access to the primary domain as thats controlled by a larger organisation. I'm wondering how to set this up so it tracks correctly? Do I set the domain name in my property to the primary domain, or the main subdomain? For example I have test1.example.com (which is basically a homepage), test2.example.com, test3.example.com and test4.example.com which are various sections. As stated, I don't control the root example.com so Do I use setdomainname test1.example.com in the tracking code or setdomainname example.com. Apply filters etc and then setup profiles for each subdomain? Hope this makes sense. Thanks.
Reporting & Analytics | | breaktheseal0