Bradmax analytics

Data type: object

Configuration path: .bradmaxAnalytics

Description: Configuration for rendering HTML player skin.

Field nameTypeDescription
gdprAgreeRequiredboolIndicates if GDPR agree is required for users statistics.
gdprAgreeForCookieboolIndicates if agree for cookie is present for users stats.
  • General Data Protection Regulation

    • gdprAgreeRequired

      Data type: bool

      Configuration path: .bradmaxAnalytics.gdprAgreeRequired

      Description: This option indicates if user agree for cookie is required. If gdprAgreeRequired:true, then cookies will not be used for users statistics and additional agree “gdprAgreeForCookie” is required for using them. If gdprAgreeRequired:false, then it is assumed that cookie can be used without user agree. This option has to be defined in “bradmaxAnalytics” settings scope - see example below.

      Default value: false

      {
          "bradmaxAnalytics": {
              "gdprAgreeRequired": true,
              "gdprAgreeForCookie": true
          },
          "dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
      }
      
    • gdprAgreeForCookie

      Data type: bool

      Configuration path: .bradmaxAnalytics.gdprAgreeForCookie

      Description: This option works together with gdprAgreeRequired option. When gdprAgreeRequired:true, then setting this option is required for using cookies for user statistics. gdprAgreeForCookie:true indicates user agree for using cookie for statistics purpose. This option has to be defined in “bradmaxAnalytics” settings scope - see example below.

      Bradmax cookies names used for statistics purpose: _bamcdc, _bame, _baml .

      Default value: false

      {
          "bradmaxAnalytics": {
              "gdprAgreeRequired": true,
              "gdprAgreeForCookie": true
          },
          "dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
      }
      



  • Google Analytics

  • global variables:

    For configuring Google Analytics plugin there is need to add googleAnalytics key into player config JSON. Below are all available settings for object googleAnalytics. Only trackerId option is needed. Others are optional.

    Variable nameTypeDescription
    trackerIdstring (required)Tracker code UA-XXXXXXXX-X from google analytics tracking code
    urlstring (optional)Google Analytics data collector URL. Default is used if not defined.
    sendIntervalnumber (optional)Time between sending “progress seconds” event during playback. Default value: 10
  • trackerId

    Data type: string

    Configuration path: .googleAnalytics.trackerId

    Description: [required] Tracker code UA-XXXXXXXX-X from google analytics tracking code

  • url

    Data type: string

    Configuration path: .googleAnalytics.url

    Description: Google Analytics data collector URL. Default is used if not defined.

  • sendInterval

    Data type: number

    Configuration path: .googleAnalytics.sendInterval

    Description: Time between sending “progress seconds” event during playback.

    Default value: 10

  • Where find collected statistics?

    Data from Bradmax player is collected in Google Analytics as “Events” records.

    All statistics for “Events” can be found in Google Analytics > Reports > Behavior > Events.

    Real time “events” statistics are in Google Analytics > Reports > Real Time > Events.

  • Google Analytics examples:

    • minimal settings example:
      <div style="width: 600px; height: 338px;border:solid 1px #000;" id="PLAYER_DOM_ID"></div>
      <script src="PLAYER_SOURCE.js"></script>
      <script type="text/javascript">
          var playerConfig = {
              "dataProvider": {
                "id": "710",  /* NOTE: Remember to add ID for media. */
                "title": "Example title",
                "duration": 733,
                "source": [ { "url": "https://example.com/video.mpd" } ]
              },
              "googleAnalytics": {
                  /* Use your own tracker code UA-XXXXXXXX-X from google analytics tracking code */
                  /* or search for Tracking ID identifier in Google Analytics > Admin > Tracking Info > Tracking Code */
                  "trackerId": "UA-XXXXXXXX-X"
              }
          };
          var element = document.getElementById("PLAYER_DOM_ID");
          window.bradmax.player.create(element, playerConfig);
      </script>
      
    • complete settings example:
      <div style="width: 600px; height: 338px;border:solid 1px #000;" id="PLAYER_DOM_ID"></div>
      <script src="PLAYER_SOURCE.js"></script>
      <script type="text/javascript">
          var playerConfig = {
              "dataProvider": {
                "id": "710",  /* NOTE: Remember to add ID for media. */
                "title": "Example title",
                "duration": 733,
                "source": [ { "url": "https://example.com/video.mpd" } ]
              },
              "googleAnalytics": {
                  /* Use your own tracker code UA-XXXXXXXX-X from google analytics tracking code */
                  /* or search for Tracking ID identifier in Google Analytics > Admin > Tracking Info > Tracking Code */
                  "trackerId": "UA-XXXXXXXX-X",
                  "url": "https://www.google-analytics.com/collect",
                  "sendInterval": 60
              }
          };
          var element = document.getElementById("PLAYER_DOM_ID");
          window.bradmax.player.create(element, playerConfig);
      </script>
      

Demo page: https://bradmax.com/static/bradmax-player-analytics-demo/google.html