Tracking settings

This document provides an overview and usage guidelines for the privacy settings API. The API allows users to set their consent preferences to control the collection and tracking of their personal inf

Specifically, this documentation covers:

  1. API call to set consent _fwn.analytics.setConsent(ConsentLevel)

  2. Global config attribute tracking_opt_in to select opt-in tracking for EU compliance

Usage guidelines for the window._fwn.analytics.setConsent() function, which is part of the analytics module provided by the _fwn global object in JavaScript. The purpose of this function is to allow users to set their consent preference for data collection and tracking.

_fwn.analytics.setConsent(consentType)

Parameters

  • consentType (string): The type of consent to be set. It can have two possible values: "essential" or "non-essential". In the case of "non-essential" tracking, Firework will track both "essential" and "non-essential" events.

Example

// Set consent to "essential"
window._fwn.analytics.setConsent("essential");

// Set consent to "non-essential"
window._fwn.analytics.setConsent("non-essential");

When the window._fwn.analytics.setConsent() function is called, it updates the user's consent preference for data collection and tracking.

It is recommended to implement an interface in your application that allows users to set their consent preferences explicitly. By providing clear information and options, you can ensure compliance with privacy regulations and respect the user's privacy choices.

By default, Firework widgets are using opt-out tracking, which means that both essential and non-essential tracking is done, unless user decides to set consent level to only "essential" tracking.

Opt-In Tracking

By default, fwn.js implements opt-out tracking, which means that all user requests are tracked unless user explicitly opt-out. However, to comply with European Union (EU) regulations, you can configure fwn.js to use opt-in tracking instead. Opt-in tracking ensures that only essential requests are tracked, and users need to provide their consent by calling setConsent to enable tracking of non-essential requests.

Configuration Steps

To enable EU opt-in tracking with fwn.js, follow the steps below:

  1. Locate the section of your code where the Firework script is included. It is typically added as a <script> tag in the <head> or before the closing </body> tag.

  2. Add the data-fwparam_tracking_opt_in="true" attribute to the <script> tag that loads the fwn.js script. This attribute informs fwn.js to use opt-in tracking instead of the default opt-out behavior.

    Example:

    <script src="path/to/fwn.js" data-fwparam_tracking_opt_in="true"></script>

Additional Considerations

  • Ensure that you have obtained valid and informed consent from your users before implementing opt-in tracking. Provide clear information about the purpose of tracking and give users the ability to control their preferences.

  • Review and comply with relevant privacy laws and regulations, such as the General Data Protection Regulation (GDPR), while implementing opt-in tracking.

  • Regularly monitor and update your tracking practices and user consent preferences to stay compliant with evolving privacy regulations.

Last updated