Google Analytics event tracking for Confluence attachments?

Has anyone found a way to get Google Analytics (GA) event tracking working with attachments in Confluence?

GA event tracking requires a call to the _trackEvent() method in the source code of a page object, widget, or video i.e. for a video play, the following code needs to be added between the <a href> tags - <a href="#" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);">Play</a>.

However as Confluence uploads attachments through a macro, I can't seem to access the source code to insert the call.

We track visitors, pages etc through GA across two sites and would love to track attachments in Confluence from our public facing resource library (we're a health non profit). GA event tracking allows us to set up user defined categories, actions, labels and even assign a value to an event. Cross-tabbed with our other GA data (visitors, referral source, etc) this data would be invaulable for us!

Any and all suggestions welcome!


1 answer

1 accepted

Hi Odette, AppFusions' Google Analytics for Confluence plugin tracks attachment downloads by default using click handlers on all links to attachments.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

391 views 17 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you