Azure-Samples / media-services-javascript-azure-media-player-google-analytics-plugin

A Google Analytics plugin for Azure Media Player
MIT License
13 stars 4 forks source link

Google Tag Manager support #3

Open ThijsHakkenbergLobster opened 7 years ago

ThijsHakkenbergLobster commented 7 years ago

We're using a Google Tag Manager only setup and ideally we would like to use the datalayer to track events; It might be as simple to add to https://github.com/Azure-Samples/media-services-javascript-azure-media-player-google-analytics-plugin/blob/master/amp-ga.js#L397

dataLayer.push({ 'event' : 'trackEvent', 'eventCategory' : category, 'eventAction' : action, 'eventLabel' : eventLabel, 'eventValue' : value });">

ThijsHakkenbergLobster commented 7 years ago

I've implemented an method to solve this; related push request: https://github.com/Azure-Samples/media-services-javascript-azure-media-player-google-analytics-plugin/pull/4