Our customer website is build in SP 2013 and links to all PDFs in another SP site. There are no master pages for GA code to be placed so that we can track views on our PDFs. What options do we have without a master page for the code block?

  • you could use jquery to change the hrefs that are for pdf files to a jquery function which creates a view/download event with Google Analytics then delivers the pdf – ozhug Feb 12 '15 at 4:05

If your users can only access the PDFs by clicking a link, you should be fine with adding the GA code to your master page. But it's a problem if the PDFs are accessed directly - if there's no clicked link , Google Analytics can't track it.

The IRS has the same problem:


I've heard of custom-built solutions that use PHP and the Measurement Protocol, but you're better off using something that will work with Google Analytics out-of-the-box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.