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.

🚧

Note

Privacy Mode does not currently apply to Live events in the same way it does for video and channel views. If Privacy Mode is enabled, we still collect identifiable event data when using a Wistia registration form.

If your organization requires strict privacy controls, there are two options for using Live events with minimal data collection:

  1. Use a Marketing Automation Platform (MAP) form : Wistia does not store registration data. Only registration information is passed back to your MAP—no attendance or engagement data is tracked or shared.
  2. Turn off registration entirely: No personal information is collected when registration is off. Wistia only provides anonymous, aggregate analytics when Privacy Mode is enabled.

Per-viewer consent vs. your account default

There are two layers of control, and it helps to keep them straight:

  • Account default (global). The Privacy Mode toggle in your account settings sets the starting state for every viewer on every embed for your account. This is the baseline.
  • Per-viewer override (the API below). The consent() method overrides that default for the current visitor in their current browser, and the choice is remembered in their browser's localStorage. It does not change your account settings and does not affect any other visitors. Use it to wire up a cookie banner or consent prompt: when a visitor opts in, call W.consent(true); when they opt out, call W.consent(false).

Consent applies to the visitor, not to a single video — if you set consent on a page with several Wistia embeds, it applies to all of them for that visitor.

What Privacy Mode means for your analytics

When a visitor is in Privacy Mode, Wistia collects only anonymized data. The practical effects to expect in your reports:

  • Views may show up without an identified viewer. You'll still see that a play happened, but it won't be tied to a person, email, or returning session.
  • You can see "visits without plays." A visit is recorded when the player loads on the page; a play is recorded when the viewer presses play. Anonymized visitors and viewers who load but never press play both contribute to a gap between visits and plays — this is expected, not a tracking bug.
  • Heatmaps and individual viewer histories won't populate for anonymized viewers, because those require the session/cookie tracking that Privacy Mode disables.

If your analytics look lighter than your traffic suggests, confirm whether Privacy Mode is enabled (account-wide or per-viewer) before treating it as data loss.

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("Viewer consent to tracking?", 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.