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 -
Trying to locate the e commerce tracking code on shopify?
Hi everyone, I am doing a google analytics site audit for an e commerce site using shopify. I can see e commerce data on GA but I'd like to make sure that e commerce tracking code is present and correct. I have the shopify thank you page checkout.shopify.com/example1234556 but cannot locate the client's e commerce tracking code http://cl.ly/191F0Z460p1L. I guess this is normal since we are on the shopify domain. Is this normal to not have the client e commerce tracking code present on shopify thank you page? Does shopify have a system in place that integrates and or generate this e commerce tracking code for the client? Finally, how can I verify if the ga e commerce tracking code on shopify is correct and in place? Thanks for letting me know!
Reporting & Analytics | | Ideas-Money-Art0 -
Tracking Organic Traffic and Conversions from multiple TLDs with Google Tag Manager
Hello Guys, I want to track traffic / conversions from different domains (basically same brand - but a lot of different TLD's). The "problem" is that the main conversion which I want to track always happens on the .com TLD and all other TLD's link to there. The problem is, that now the traffic always counts as Referral Traffic, even after setting up cross domain tracking over the google tag manager... So example: Sessions begins on example.co.uk/landing-page11 after User searched on it on google. He decides to buy the product and therefore moves to example.com for the checkout process. No I will have the conversion in my google analytics under referral with example.co.uk. --> but I want to have it under organic, and not under referral. How I can manage this? Thanks for you Help!
Reporting & Analytics | | _Heiko_0 -
Track subdomains in the same analytics property/view
Hello to everyone, this is my first question (kind of a newbie here :-D). I have a website that spans over 4 subdomains + the main domain and I'd like to have a place where I can see the total page views, events and goal completions. Main domain is langhe.net, and subdomains are eventi.langhe.net, servizi.langhe.net, shop.langhe.net, about.langhe.net. The website is based on wordpress and I'm using google analytics for wordpress by yoast as analytics plugin. The configuration of the plugin is as follows: all the website have the same UA-XXXXXXXX code The Subdomain Traking field (setDomainName) is filled with .langhe.net Cross-Domain tracking is enabled Cross-Domain Primary Domain (setDomainName) is langhe.net Cross-Domain Tracking, Other Domains field is filled with: about.langhe.net, eventi.langhe.net, servizi.langhe.net, shop.langhe.net. In the GA property I've created an Advanced Custom Filter configured this way: Field A -> Extract A = hostname (.*) Field B -> Extract B = request URI (.*) Output To -> Constructor = request URI $A1$B1 Field A Required: yes Field B Required: No Override Output Field: yes Case Sensitive: no I was wondering it this is the best way of doing it, or if there are other "best practice" ways to obtain what I'm looking for (for example with this configuration it's become quite difficult to separate the traffic sources for each website). Thank you in advance 🙂
Reporting & Analytics | | Enrico_Cassinelli
Cheers!0 -
Domain redirect for direct mail (source) tracking in Analytics?
We have a client that would like to do some direct mail marketing and the plan is to use a short/simple domain in the marketing materials, which redirects to the main site domain. By default this would show as a referral traffic source in Analytics, right? So any traffic that came through that redirect would be attributed to "shortdomain.com / referral"? Meaning I wouldn't need to do any sort of customized, advanced tracking set up to track conversions that I've already set up (ecomm and goals) and attribute them to this new source? Just double checking that I'm not overlooking something. Thanks!
Reporting & Analytics | | VTDesignWorks0 -
Cross Domain Tracking in GA (without cross domain links)
Hi everyone, Been doing some research about cross-domain tracking in Google Analytics (preferably Universal Analytics where documentation is a bit spare). All of the tutorials focus on the auto-linking and ensuring links to the other site are taken care of. I'm considering a site that may not cross-link like that at all (or it may, but won't be the main avenue). A good example is: www.gap.com
Reporting & Analytics | | ketanmv
www.bananarepublic.com
www.oldnavy.com Now, they do link to the other brands in their navigation but let's pretend that they don't necessarily do that. Gap Corporate may want to roll up all these domains into a single reporting profile because customers can clearly visit any of those sites on their own and buy. It would be nice to know that Visitor X bought 2 items from gap.com and 3 from oldnavy.com... and of course, here were their campaigns, etc. From what I am reading, I am not sure this is really possible. It seems that the cross-domain code is really only best for when my main site links to another domain for checkout or something. But in my example, we are definitely not in control of that kind of behavior. Thoughts? Perhaps I need to recommend they go with subdomains only which Universal GA seems to handle quite fine out of the box. Thank you!0 -
How to track click on phone number on mobile device in GA as a goal?
Hi, I work with a lot of physicians and one of the things I'd like to do is add a goal in GA so we can try to track how many visitors are clicking the phone # to call the office from smartphones. Would doing this be as straight-forward as adding a the standard javascript click text that I'd add for an external link? And Is there a way to make a goal only "count" if the user-agent is a smartphone? Because if I attach the JS to the phone #, it's going to be in all of the HTML regardless of which device is used. Unless of course, I mess with the CSS to only make the javascript code appear on certain stylesheets. Thank you!
Reporting & Analytics | | Titan5520 -
Tracking 301'd Domains
'ello SEOMozers 🙂 I've been implementing some awesomely search engine friendly 301'd domains for clients and they work great but I seem to have missed the point where I track said domains in some fashion and come here to ask the question --> how are you all tracking refers from 301'd domains that are pointed to your main hubs? Currently our practice in-house is to alias them in our servers then use .htaccess rules to 301 them to the 1 domain to-rule-them-all but Google Analytics doesn't recognize them as different domains with that plan of action and there goes my refer tracking. Is there a super-star way to use the Google URL Builder and combine that with the above plan of action or a better plan? Has anyone else implemented something else more awesome-er that could help a girl out? Much thanks and Happy Thursday!
Reporting & Analytics | | treefrogseo0