d
Topic
Posts:
1
5 months ago

Tracking Downloads Via Google Analytics

Hi,

Does anyone know how to get the event tracking in google analytics to work for tracking downloads s an event.

The example URL is:

<a href=”pdfs/my-file.pdf” target=”_blank” onclick=”_gaq.push([‘_trackEvent’,’Download’,’PDF’,this.href]);”>Download my file</a>

But the error below i thrown back:

how-fast:1123 Uncaught ReferenceError: _gaq is not defined

    at HTMLAnchorElement.onclick (how-fast:1123)

Does anyone know how best to implement on Shopify without impacting the native Google Analytics.

Thanks

Adam

i
Replies
Posts:
25
5 months ago

Hi Adam and Konstantin,

I'm Sarosha from Aiva. Our app, Aiva Overlays can help you integrate an overlay with a downloadable asset directly with Google Analytics for FREE. Aiva features an easy integration and will track all file downloads to both your GA dashboard and in Aiva's Analytics tab. You can link your download in our builder by using the "Download a File" action. 

Please free to reach out if you have any questions 😊

5x your website conversion today → apps.shopify.com/aiva-labs