LT.js Basic Implementation

OVERVIEW

The following provides information on how to implement Lightning Tag in its basic form, and assumes you have already completed the required pre-implementation setup. This basic version of Lightning Tag will:

  1. Execute data collection rules that you have configured in cooperation with your Lotame account representative.
  2. Deploy subscribed sync pixels.
  3. Deploy export beacons.

Lightning Tag Setup

Setup of the Lotame Lightning Tag javascript on your website requires creating an input object that gets passed to an initialization function that prepares a window namespace on your page for the javascript tag itself.

The following HTML snippet completes these steps for you.

<head>
  <link rel="preconnect" href="https://tags.crwdcntrl.net">
  <link rel="preconnect" href="https://bcp.crwdcntrl.net">
  <link rel="preconnect" href="https://c.ltmsphrcl.net">
  <link rel="dns-prefetch" href="https://tags.crwdcntrl.net">
  <link rel="dns-prefetch" href="https://bcp.crwdcntrl.net">
  <link rel="dns-prefetch" href="https://c.ltmsphrcl.net">

  <script>
    ! function() {
      var lotameClientId = '<lotameClientId>';
      var lotameTagInput = {
          data: {},
          config: {
            clientId: Number(lotameClientId)
          }
      };

      // Lotame initialization
      var lotameConfig = lotameTagInput.config || {};
      var namespace = window['lotame_' + lotameConfig.clientId] = {};
      namespace.config = lotameConfig;
      namespace.data = lotameTagInput.data || {};
      namespace.cmd = namespace.cmd || [];
    } ();
  </script>

  <script async src="https://tags.crwdcntrl.net/lt/c/<lotameClientId>/lt.min.js"></script>
</head>

To use this snippet properly, you must replace the instances of <lotameClientId> with your Lotame client ID, e.g.:

var lotameClientId = '123456';

Lotame recommends loading the Lightning Tag directly on your page, in the <head> section. Lotame also recommends against loading through a tag manager such as Google Tag Manager (GTM) if at all possible.

Note: You must source the Javascript tag directly from Lotame's server on the page, as shown above, to ensure correct functionality, as this code is dynamically generated for your implementation. Our Javascript tags are hosted in the AWS Cloudfront CDN to provide the lowest latency possible worldwide.

Beyond the Basics

The remaining articles in this category describe additional functionality that can be added using Lightning Tag:

  1. Data Collection  - sending 1st party data directly into the tag.
  2. Profile Extraction - retrieving the profile id and list of audiences, in order to pass audiences and/or profile ids into Google Ad Manager calls (or other platforms.)
  3. User Consent - passing consent signals into the Spherical Platform.