Documentation / Product / Features / Lytics JavaScript Tag / Using Version 3

Installation & Configuration

In most cases, installing the Lytics JavaScript tag version 3 is as easy as copying and pasting a few lines of code to your source code or Tag Manager. Full instructions, as well as the tag itself are available from the web app.

Configuration Options

Version 3 of our JavaScript tag comes configured out-of-the-box with coverage ready for most use cases. That said, there are a variety of configuration options available to support custom or in-depth use cases. Please find all available configuration options below with additional details listed after the table. You can see more implementation examples in the app tag installation instructions.

KeyTypeExampleDescription
url requiredstring//c.lytics.ioURL endpoint to send the collection request.
cid requiredstring{YOUR_LYTICS_CID}Account ID which can be found in your dashboard Account Settings.
loadid optionalbooleantrueUsed when identifying users across domains.
blockload optionalbooleantrueUsed to get a user’s most updated audience membership and profile data before sending data to Lytics.
stream optionalstringgetlyticsName of the stream your data will be sent to.
sessecs optionalinteger1800Length of time between requests necessary before starting a new session. 1800 by default.
qsargs optional[]string['name','status']An array of query parameters that should always be pulled in when collecting data.

Additional details

  • url: The generated URL should never be changed as it will prevent your data from being sent to Lytics.
  • cid: When using the tag generated from your Lytics account, your ID will be included and should not be altered.
  • loadid: By default, Lytics will store a first and third-party cookie that represents a user. The loadid flag allows Lytics to use the third-party cookie if available, thus pulling cross-domain behavior into a single, unified user profile.
  • blockload: This is set to true by default. Only installations highly dependent on reducing latency as much as possible should use false.
  • stream: When collecting data across various domains, it is common to use a custom stream for each domain, which will require proper LQL in place to surface the collected data as user fields. Consult customer support for more details.

Custom Configuration Example

When calling jstag.init you will pass in the tag configuration. You can take advantage of the above configuration options by adding them to your configuration. For example, if you want to leverage third-party cookies to enhance your brand’s ability to resolve identities between owned properties, add loadid to the configuration.

jstag.init({
  src: ...,
  loadid: true
});