Data type: object
Configuration path: .bradmaxAnalytics
Description: Configuration for rendering HTML player skin.
Field name | Type | Description |
---|---|---|
gdprAgreeRequired | bool | Indicates if GDPR agree is required for users statistics. |
gdprAgreeForCookie | bool | Indicates if agree for cookie is present for users stats. |
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" } ]}
}
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" } ]}
}
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 name | Type | Description |
---|---|---|
trackerId | string (required) | Tracker code UA-XXXXXXXX-X from google analytics tracking code |
url | string (optional) | Google Analytics data collector URL. Default is used if not defined. |
sendInterval | number (optional) | Time between sending “progress seconds” event during playback. Default value: 10 |
Data type: string
Configuration path: .googleAnalytics.trackerId
Description: [required] Tracker code UA-XXXXXXXX-X from google analytics tracking code
Data type: string
Configuration path: .googleAnalytics.url
Description: Google Analytics data collector URL. Default is used if not defined.
Data type: number
Configuration path: .googleAnalytics.sendInterval
Description: Time between sending “progress seconds” event during playback.
Default value: 10
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.
<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>
<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