Google Analytics Integration


KWIKplayer is compatible with Google Analytics and allows you to collect data from the player.

Google Analytics inegration should be added at the head of the page.

In order to integrate Google Analytics into your page, you would need to:

  • Add a unique script reference to your google analytics script should be added.
  • Push the google analytics references into your window.dataLayer parameters.

In the example below, we integrate google analytics into our video with a unique google analytics ID "myUniqueGAid":


 <head>
 ...
 <script async src="https://www.googletagmanager.com/gtag/js?id=myUniqueGAid"></script>
 <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', 'myUniqueGAid');
 </script>
 ...
 </head>
        

Integrating Google Analytics into your pages will allow to track events on your page which are tracked by the mediaid.

Some of the events are:

  • play
  • pause
  • Ended
  • Fullscreen