Analytics
4.8K members online now
4.8K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Import pdf downloads?

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

We have a number of pdfs available on our various company sites. 

 

Although we haven't yet implemented it, I am aware that analytics can track pdf 'downloads' by attaching event tracking to the links used to access the pdfs on a page. 

 

However, there may be a significant number of downloads of our pdfs where no javascript is possible ie when a direct link to the pdf is used (eg from an email) which bypasses the containing page.

 

I have seen some code using php which calls ga updating code from serverside php, but this won't be possible for us.

 

Our other idea is to extract the pdf download activity from the server http logs.

 

Ideally, we would then import that in some way into Google Analytics (for example as a virtual pageview), but I am not sure that is possible. 

 

My reading of the data import documentation seems to suggest that it is only used to add custom metrics to existing pageviews rather than creating new data (although I may be wrong here).

 

Are there any other solutions to get this data into analytic?

 

Thanks

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Arnold Stang
March 2017

Import pdf downloads?

Top Contributor
# 3
Top Contributor

Or, you know, use my solution :-)

http://juliencoquet.com/en/2013/04/05/track-pdf-downloads-with-google-universal-analytics-no-javascr...

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

View solution in original post

Import pdf downloads?

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭

when a pdf download link is used from an email, you definitely use measurement protocol to track these activities.

 

https://developers.google.com/analytics/devguides/collection/protocol/v1/email#events

 

https://ga-dev-tools.appspot.com/hit-builder/

 

Marked as Best Answer.
Solution
Accepted by topic author Arnold Stang
March 2017

Import pdf downloads?

Top Contributor
# 3
Top Contributor

Or, you know, use my solution :-)

http://juliencoquet.com/en/2013/04/05/track-pdf-downloads-with-google-universal-analytics-no-javascr...

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Import pdf downloads?

Follower ✭ ☆ ☆
# 4
Follower ✭ ☆ ☆

Julien

 

I wasn't aware of .../collect - this looks like a very good solution, and I will definitely try this.

 

Thanks!

Import pdf downloads?

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

Unfortunately, I won't be able to edit the emails to add code.

 

Thanks

Import pdf downloads?

Top Contributor
# 6
Top Contributor

Right but my solution does not entail tagging emails :-)

Essentially, it answers your question about extracting the pdf download activity from the server http logs.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Import pdf downloads?

Follower ✭ ☆ ☆
# 7
Follower ✭ ☆ ☆

Julien

 

No, I was replying to the other poster

Import pdf downloads?

Follower ✭ ☆ ☆
# 8
Follower ✭ ☆ ☆

Julien

 

As you have seen, I think this looks like a good solution and I have tested it. The only pitfall I can see is not being able to specify the date of the event or pageview - it seems to use the date you post to .../collect

Do you know if there might be any way to backdate this?