So I have a rescue client running EE 2.10.1 where the client has a number of videos across the site that he wants to track plays. Can anyone provide pointers on how I can achieve this? I'm not very familiar with GA, usually just drop the code into the site and I'm done with it. Here is a quote from my client

On my Vendor Entry Form Page I have a Vendor Tracking Code at the bottom. I then use this code on my Article Pages, Manufacture Pages, Redirect Pages. This allow me to run my GA Report using that code and all the activity show up on one report per client. This is what I use to charge my clients.

On the Vendor Entry Form, I can add Video. However when the video is watched, it doesn't get tracked. No Video is being tracked on my site. I would like to add the vendor code somehow so that when the Video is clicked on and watch, that activity url shows up on my report also.

Looking at the current GA code I see a bit of custom code being sent that looks similar to this: https://developers.google.com/analytics/devguides/collection/analyticsjs/events


ga('send', {
  hitType: 'event',
  eventCategory: 'Videos',
  eventAction: 'play',
  eventLabel: 'Fall Campaign'

Would I be able to add that into this bit of the GA code and not break anything?

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-*******', 'auto');
  ga('set', 'dimension1', '{exp:stash:client_code}');
  ga('send', 'pageview');


1 Answer 1


You could take a look at Google Tag Manager. I use it to inject GA code into our website pages and for click tracking purposes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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