Consent Handling

Rationale

The embed can recognise a returning reader, for example to show a poll as already answered. Whether it may store something for that on the reader’s device depends on your reading of GDPR and ePrivacy and on what the reader agreed to. The identity-tracking mode lets you decide.

Identity-tracking modes

The mode applies to every NXT element on the page.

Mode Stored on the reader’s device Device id on analytics events Poll, quiz & one-per-reader form submissions
full a persistent device id, written when the embed starts yes the device id
functional (default) nothing until the reader votes, answers a quiz or sends a one-per-reader form; then a random id for that one piece of content, plus the poll’s answer no the id for that piece of content; a reload keeps the poll answered
off nothing, ever no an id held in memory for the page load

Other forms send no reader id in any mode. Analytics events are sent in every mode. In functional and off they only carry ids that live in memory for the page load. The full list of what is stored and sent is in Data Protection.

Trade-off of off: because nothing is stored, a reload shows a poll as unanswered, and an anonymous reader can vote again. A reader you identify with setUserId still votes only once.

1. Setting the mode on the script tag

Add data-nxt1-identity-tracking to the script tag. A missing or unknown value means functional.

<script type="module" src="https://<tenant>.apps.tickaroo.com/nxt/embed/nxt1.js" data-nxt1-identity-tracking="full"></script>

The mode can’t be set through the page URL, so a link can never switch a reader to full.

window.nxt1.setIdentityTracking(mode) switches the mode without a reload. It throws an error for an unknown mode.

  • Switching down deletes data. Switching to functional deletes the device id. Switching to off also deletes the ids for individual pieces of content and the stored poll answers.
  • Switching up to full keeps answered polls. A poll the reader answered before consenting stays answered.

window.nxt1 exists once the embed has started. Your banner code may run before or after that, so handle both cases:

function applyConsent(nxt1) {
  nxt1.setIdentityTracking(myCmp.hasConsent('statistics') ? 'full' : 'functional')
}

function withNxt1(callback) {
  if (window.nxt1) {
    callback(window.nxt1)
  } else {
    window.addEventListener('nxt1:initialized', (event) => callback(event.detail.nxt1), { once: true })
  }
}

withNxt1((nxt1) => {
  applyConsent(nxt1)
  myCmp.onChange(() => applyConsent(nxt1))
})

Replace myCmp with the API of your consent management platform. When the reader withdraws consent, the example switches to functional, which deletes the device id.

If you start every reader in full on the script tag and only switch down on refusal, the device id is written before the reader decides. To store nothing before consent, keep the default functional (or off) on the script tag and switch up once the reader agrees.