Cookies in Bitmovin Analytics
What the cookie enables
Cookies in Bitmovin Analytics are used to store a unique identifier on the viewer’s device to re-identify a specific viewer as a unique user
, when she returns to watch another video.
Setting this cookie enables the metric Unique Users
in Bitmovin Analytics. Without a unique identifier specified in the cookie, the number of Plays
will equal the number of Unique Users
.
We only set a first-party cookie that stores information that is only readable by Bitmovin Analytics on your domain. We don’t engage in any cookie matching or similar cross-site tracking.
How can the cookie be configured?
Cookies by default are set without a domain but it is possible to specify the cookie domain as per the HTML specifications for cookies: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
To configure the cookie domain you can use the cookieDomain
setting in the config
property of the analytics collector:
let analyticsConfig = {
config: {
cookiesDomain: 'bitmovin.com'
}
};
This will result in a cookie being written with: Domain=bitmovin.com
This is useful if you want to share cookies across subdomains of your main domain as per default subdomains of your domain are not allowed to read the cookie set for your domain.
So the above example enables all subdomains of bitmovin.com to read the cookie set for bitmovin.com.
You can read more on Cookie Domains at MDN
How can a cookie be disabled?
Cookies in Bitmovin Analytics can be fully disabled. There are two methods to disable cookie tracking for a specific user.
Method 1: Disabling Analytics completely at the root level (no cookie will be set here):
let playerConfig = {
// player configuration stuff
analytics: false
}
Method 2: Disabling cookies in the analytics config using cookiesEnabled:
let playerConfig = {
// player configuration stuff
analytics: {
config: {
enabled: false/true, // this controls whether or not the collector is enabled / will report data
cookiesEnabled: false // this will only disable the cookie - the collector could still be enabled/disabled
}
}
}
Note: If you set enabled: false the cookie will be initialized regardless if you don’t set the cookieEnabled setting specifically.
Updated 11 months ago