homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: DixonJones & mademetop

Website Analytics - Tracking and Logging Forum

Google analytics tracking .pdf content from a SERP
analytics tracking .pdf from search engine click

10+ Year Member

Msg#: 3751120 posted 10:16 am on Sep 24, 2008 (gmt 0)

I have posted another thread up about the indexing of .pdf content vs .aspx content a moment ago and now am posting a seperate question relating to the tracking of the traffic that comes through .pdf content directly from Google.

Google Analytics does not currently display the performance of traffic entering directly on PDF content on my clients site (of which there are plenty) - My means of resolving this are as follows: (however I don't feel it will work quite how I want it to)

[My thoughts/method to resolve this matter come from the following links]


These two articles seem to suggest that the tracking of the PDF is relatively easy and accurate through analytics.

"For example, to log every click on a particular link to www.example.com/files/map.pdf as a pageview for /downloads/map you would add the following attribute to the link's <a> tag: "

However - This method wouldn't show traffic entering the .pdf directly from Google SERP's? (IE. a .pdf indexed in google)

In the sitemap it is not possible to include the "On Click" and Google would index the destination page, not the referring link - is there a means of including the analytics code within the .pdf files? or within the link to the content?




Receptional Andy

Msg#: 3751120 posted 6:57 pm on Sep 24, 2008 (gmt 0)

Since GA relies on javascript code, you would need to include javascript within the PDF file, and rely on it being executed - i.e. hope to good fortune ;)

I believe you can include javascript in newer PDF documents, but frankly I wouldn't want to rely on that.

This is one of the situations where on-page tagging for analytics loses out to server log files.

The onclick suggestion is also somewhat inelegant and high-maintenance - it would be better if GA followed some of the other vendors in automatically tracking clicks on files like PDF, executables and archived files and recording them as downloads anyway.

You can't include onclick events within a sitemap. The only way you could possibly achieve something similar would be to have an interim page between the user and the PDF content which communicated to the GA servers - technically possible, but very messy since you would still need googlebot to access the PDFs directly for them to appear in search results.

Unfortunately, I'd say you're stuck with the imperfect suggestions offered by the Google knowledgebase, and perhaps look into whether you can embed the GA code successfully within a PDF file and get any useful stats back.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved