Player Privacy Mode

Enable or disable Privacy Mode for individual visitors using the Player API

Our video player has a special mode called Privacy Mode that only collects fully anonymized viewing data by disabling session and cookie tracking and anonymizing IP addresses. You can change whether this mode is enabled by default for your account in your account settings. This mode makes sure Wistia video viewing is compatible with GDPR regulations. If you want to learn more about Wistia and GDPR, refer to our documentation on that.

When Privacy Mode is enabled, you may have a way for visitors to opt in to being tracked. When that happens, you can use the Player API to enable non-anonymous tracking for those specific viewers.

Using the API

Note that, for the API methods below to run, Wistia’s embedding script, https://fast.wistia.com/assets/external/E-v1.js or https://fast.wistia.net/assets/external/E-v1.js, must be present on the page.

Enable tracking for a single visitor

To enable tracking of a specific visitor, you can mark that they consent to being tracked:

window._wq = window._wq || [];
window._wq.push(function (W) {
  W.consent(true);
});

This setting is persisted in localStorage, so you don’t need to call this on every page load.

Disable tracking for a single visitor

If a visitor decides that they would like to be anonymous, you can put them into Privacy Mode, whatever your account settings may be:

window._wq = window._wq || [];
window._wq.push(function (W) {
  W.consent(false);
});

Calling W.consent(false) will remove any temporary storage used for tracking purposes. Some cookies and localStorage that are used for non-tracking functionality may remain.

Check whether a visitor is in Privacy Mode

To see if a visitor is in privacy mode:

window._wq = window._wq || [];
window._wq.push(function (w) {
  console.log("In privacy mode?", W.consent()); // returns true or false
});

Return a single visitor’s preference to the account default

If you would like to defer a visitor’s consent to your account default, you can do the following:

window._wq = window._wq || [];
window._wq.push(function (W) {
  W.consent('default');
});

Notes

If videos for multiple accounts are on the same page and have different Privacy Mode settings, then Privacy Mode is considered ON. That is, when in doubt, we will not track the viewer.

Videos in iframes can receive consent using the browser’s postMessage() feature. However, if the video’s iframe is separated from the parent page by an intermediary iframe, it cannot communicate, and W.consent(true) or W.consent(false) will have no effect on it in that case.

IE8 and below — and IE11 when in IE8 compatibility mode — do not currently support Player Privacy Mode.