Understanding Lytics / Product Documentation / Lytics Javascript Tag


While the default tag is sufficient for the vast majority of applications, the Lytics JavaScript tag offers a variety situational configuration options. At a minimum, your cid and url is required in order for the tag to work. Below you will see both a parsed out JavaScript object containing our initial configuration parameters and a snippet from the standard Lytics JavaScript tag.

Configuration Object

  cid: "{YOUR_LYTICS_CID}",
  url: "//c.lytics.io",
  min: true

Snippet Highlighting

    <script type="text/javascript">
        ...window.jstag.init({cid:"{YOUR_LYTICS_CID}", url:"//c.lytics.io", min:true});

As you can see in the above example, at the tail end of your Lytics JavaScript tag you will simply drop in the configuration object as a parameter to the window.jstag.init() method.

Configuration Options

urlstringY//c.lytics.ioThe URL endpoint to send collection request to. The URL that is generated for you should never be changed as it will prevent your data from being sent to the Lytics CDP.
cidstringY{YOUR_LYTICS_CID}Your account ID. Your account ID can be found from your dashboard within the "account" menu. When using the tag generated from your Lytics account your ID will be included and should not be altered.
loadidbooleanNtrueThe loadid key is used when identifying users across domains. By default Lytics will store a 1st and 3rd party cookie that represents a user. The loadid flag allows Lytics to use the 3rd party cookie if available thus pulling cross-domain behavior into a single unified user profile. **Note: v1.31 and v2.0.0 have a dependency on jQuery in order to access third party cookies. If jQuery is not available the first party will be used.
blockloadbooleanNtrueBlockload is used in order to get the most up to date audience membership and profile data for a user before sending data to Lytics. By default this should be true. Installations highly dependent on reducing latency as much as possible should use false.
streamstringNgetlyticsThis represents the name of the stream your data will be sent to. When collecting data across various domains it is common to use a custom stream for each. Please note, using a custom stream will require your account to have the proper LQL in place in order to surface the collected data as user fields. Consult customer support for more details.
sessecsintegerN1800Length of time a between requests necessary before starting a new session. 1800 by default.
qsargs[]stringN['name','status']An array of query params that should always be pulled in when collecting data.