Welcome to WebmasterWorld Guest from 220.127.116.11
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?
joined:Jan 27, 2003
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.