LT.js User Consent Guide


Lightning Tag offers a feature to pass consent signals into Lightning Tag to inform Lotame of a user’s consent. This article will provide documentation on how to implement code to pass consent signals into Spherical through Lightning Tag.

Passing Consent Signals Into Lotame

For clients that utilize Lotame's Consent Management tools, consent signals can be passed directly into Lightning Tag. Use this feature to inform Lotame of each user's consent preference and how they are handled within the Spherical platform.

// Callback that runs when setConsent() completes
function setConsentCb(returnData) {};

// Set these as true or false as per the signals from your User Consent process
var customerConsents = {
  analytics: true,
  crossdevice: true,
  datasharing: true,
  targeting: true
window.lotame_<lotameClientId>.cmd.push(function() {
  window.lotame_<lotameClientId>.setConsent(setConsentCb, <lotameConsentClientId>, customerConsents);

Important Note: If this is your first time using Lotame's consent signals, please be sure to set your Consent Policy by Region by submitting the relevant info in a Support ticket form through this link. The relevant info can be found here.

Callback Data

The following table describes the possible responses that could be contained in the returnData object provided to your callbacks:

Return State Object Description
  "profileId": "LOTAME_PROFILE_ID",
  "consent": [{
    "lastupdate": UTC_SECONDS,
    "types": [{
      "name": "analytics",
      "consent": true
    }, {
      "name": "targeting",
      "consent": true
    }, {
      "name": "datasharing",
      "consent": true
    }, {
      "name": "crossdevice",
      "consent": true
Spherical recorded the consent signals as indicated and will enforce them going forward. The Lotame Consent API will only store and return here signals that you’ve explicitly provided via a set call (i.e. the types array could be empty).
Browser opted out of Lotame cookies
{"error": 200}
The Spherical Platform is unable to store or enforce consent.
Could not write cookie
{"error": 201}
The Spherical Platform is unable to store or enforce consent.
Consent Collection not enabled
{"error": 202}
The client id is not configured to store or enforce consent.