Player Cookies
Qbrick Player do utilize cookies to optimize CDN performance and collect analytics data based on webbrowser session ID.
NOTE: None of these cookies are required and can be blocked by customer front-end without it being any issues for the viewer.
api-IIS-Farm
Set by Qbrick loadbalancer. Saves name of server.
This is purely for optimization purposes. When this cookie is set, the Qbrick Player will do API requests straight to the same server each time.
Request URL used by player: video.qbrick.com/api/v1/accounts/ACCOUNTID/medias
api-onesite-Farm
Set by Qbrick loadbalancer. Saves name of server. This is purely for optimization purposes and specifically for Qbrick analytics.
When this cookie is set, the Qbrick Player will do API commands straight to the same server each time.
Request URL used by player: video.qbrick.com/api/v1/accounts/ACCOUNTID/analytics/player/events
Qbrick.Analytics.Player.VisitorId
Set by analytics module in Qbrick Player. Generates an anonymous unique ID that will help Qbrick analytics to determine unique views (Same user watching the same video several times).
If disabled the unique views in analytics will be a lot less accurate.
During embedding, the user can choose to or not to include this setting by using a switch for the embed code.
Enable or Disable Player.VisitorID Cookies
In many cases the end-user wants to be able to control whether or not to share information via the VisitorID cookie.
This is done via the embed code and depending on if the embed is done via an iFrame or a div embed its being handled differently. In both cases it utilizes embed parameters.
Because of this, the correct version of the embedded player needs to happen after the cookie selection step.
DIV Embed
For DIV embeds add "data-qplayer-analytics="on"" or "data-qplayer-analytics="off"" as an attribute of the div.
Please also note that this switch only works with the Qplayer and not any older or discontinued versions of the player.
Here is an example of how the embed code may look like:
<div style="position:relative;padding-bottom:56.25%;">
<div style="position:absolute;top:0;left:0;"
title="cat with job"
data-qplayer-account-id="123516"
data-qplayer-media-id="3fe16d27-c07f-4126-abe1-b0840bb06017"
data-qplayer-preset-id="Interactive"
data-qplayer-analytics="on"
></div>
<script id="qplayer" src="https://play2.qbrick.com/qplayer-beta/loader/qplayer-loader.js"></script>
</div>
The following script is an example that can be used after the initialization of Cookiebot to fetch the users cookie preferences and chooses the corresponding version of the player:
<script type="text/javascript">
window.addEventListener('CookiebotOnAccept', function () {
window.killInteractivePlayer && window.killInteractivePlayer();
var videoElements = Array.from(document.querySelectorAll('[data-qplayer-media-id]'));
var scenarioElements = Array.from(document.querySelectorAll('[data-qplayer-scenario-id]'));
var analyticsValue = Cookiebot && Cookiebot.consent.statistics ? 'on' : 'off';
videoElements.map(function(el) {
el.innerHTML = '';
el.setAttribute('data-qplayer-analytics', analyticsValue);
});
scenarioElements.map(function(el) {
el.innerHTML = '';
el.setAttribute('data-qplayer-analytics', analyticsValue);
});
window.initiateInteractivePlayer && window.initiateInteractivePlayer();
}, false);
</script>
iFrame Embed
iFrame Embed utilizes the source parameter of the window, and in a scenario where the user does not consent to use the cookie the "&ignoreAnalytics=true" would need to be added to the source.
<iframe
title="QbrickXRitualen1x1"
class="cookieconsent-optout-statistics"
src="https://video.qbrick.com/play2/embed/qbrick-player?accountId=AccPn4oB8ooNEqDOBpvqxDBIA&mediaId=9de54570-081d-485c-9188-b1753966e24d&configId=qbrick-player&pageStyling=adaptive&autoplay=true&repeat=false&sharing=false&download=false&volume=0&ignoreAnalytics=true"
allowFullScreen="true" frameborder="0" border="0" height="360" width="640">
</iframe>
When a user accepts the use of the cookie the &ignoreAnalytics=true can be disregarded.