Cookies management

This page provides an overview and usage guidelines for the privacy API related to cookies consent management - more specifically cookies, local and session storages consent and access.

This page covers:

  • _fwn.cookies Cookies consent API callbacks

  • cookies_opt_in configuration to prevent any storage access until consent is given

  • cookies_root configuration to prevent cookies being created at root domain

Firework widgets distinguish several cookie (local/session storage) categories.

  • essential

  • functional

  • performance

  • targeting


There are two implicit behaviors in which widgets can be configured - opt-in and opt-out (default).


Widget and Player uses cookies, local and session storages directly. This is a default behavior.


Widget and Player awaits for a consent to be given for each category to access user’s browser storages. Until then all storage data are kept in memory. Reloading page will cause storage data loss and user will refresh its identifiers.

To integrate widgets with opt-in strategy, integration must include cookies_opt_in="true" param on a script tag via data attribute data-fwparam_cookies_opt_in.



Root domain

Some cookies might be set on root domain to be accessible across subdomains. For example widget placed on will attempt to set the same cookie to as well as

The goal here is to be able to attribute purchase on to a video which was consumed on We understand such behavior might be undesired and can be disabled by add cookies_root="false" param to a global page configuration.

Example of a script tag with global configuration:


To grant or revoke particular consent at any time, _fwn web SDK provides several options:

  • _fwn.cookies.enableCookies to grant consent for each given category

  • _fwn.cookies.disableCookies to revoke consent for each given category

  • _fwn.cookies.setConsent revokes all consents, then grants consent to each given category

All functions above accept comma separated list of consent categories or empty string to indicate all categories.


// Grant consent to `essential` and `functional` categories 
_fwn.cookies.enableCookies('essential, functional') 

// Grant consent to all categories 

// Revoke all consents 

// Revoke all previously set consents, then set grant for new consent categories 

Last updated