BOOMR.plugins. ConsentInlinedPlugin


The Consent Inlined Plugin enables website visitors to allow or disallow Boomerang to send performance monitoring data to a remote server. This plugin comes handy because Boomerang is considered in some countries in the EU and Asia as “cookie technology” and triggers certain data protection requirements. In the Boomerang opt-out/opt-in tutorial we discuss various cases how this plugin could be instrumented.

How it works?

There are 2 popular scenarios:

  • Opt-out allowed: Beacons will be sent until visitor does opt-out. This plugin exposes public function window.BOOMR_OPT_OUT() and Boomerang will stop sending beacons after window.BOOMR_OPT_OUT() is called. Opt-out usually happens when a visitor doesn't agree with website's Cookie, Privacy and 3rd party policies.
  • Opt-in required: No beacons wil be sent until visitor does opt-in. This plugin exposes public function window.BOOMR_OPT_IN() and Boomerang will hold all beacons until window.BOOMR_OPT_IN() is not called. window.BOOMR_OPT_IN() should be called after visitor accepts and agrees with website's Cookie, Privacy and 3rd party policies.

Setup

Currently this plugin and it's configuration are not part of Boomerang build and they must be included on the page before Boomerang loader snippet.

Order

It's mandatory that we follow this order in order to include and configure the plugin properly:

  1. Inject plugin configuration.
  2. Inject Consent Plugin code.
  3. Inject Boomerang loaded snippet.

Example:

<script>
// 1. Inject plugin configuration.
window.BOOMR_CONSENT_CONFIG = {
    enabled: true
};
</script>
<script>
// 2. Inject Consent Plugin code.
...
</script>
<script>
// 3. Inject Boomerang loaded snippet.
...
</script>

Opt-out allowed

In order to allow visitors to opt-out from Boomerang we need to follow 2 steps:

  1. Inject the following following configuration before ConsentInlinedPlugin code:
<script>
window.BOOMR_CONSENT_CONFIG = {
    enabled: true
};
</script>
  1. Call window.BOOMR_OPT_OUT() when a visitor doesn't agree with website's Cookie, Privacy and 3rd party policies.

Opt-in required

  1. Inject the following following configuration before ConsentInlinedPlugin code:
<script>
window.BOOMR_CONSENT_CONFIG = {
    enabled: true,
    optInRequired: true
};
</script>
  1. Call window.BOOMR_OPT_IN() when a visitor agrees with website's Cookie, Privacy and 3rd party policies.

Beacon Parameters:

The following parameters are sent only on the first beacon when a visitor opts-in for first time.

  • cip.in: Equals 1 and indicates that visitor opted-in.
  • cip.v: Indicates the version of ConsentInlinedPlugin. It's useful to track who is using which version of the plugin because this plugin is not part of Boomerang build.

Members


BOOMR_OPT_IN()

If opt-in to Boomerang was required and this functions is called then Boomerang will start sending beacons.


BOOMR_OPT_OUT()

Boomerang will not send more beacons after this function is called.