Skip to content

Script tag ​

The script tag adds the SDK to a page without a build step. QuickPipe shows the tag with your key under Settings, then Tracking.

html
<script async src="https://cdn.jsdelivr.net/npm/@quickpipeaiab/[email protected]/dist/lg.js"
        integrity="sha384-…" crossorigin="anonymous"
        data-key="lg-pub-live-…"></script>
  • X.Y.Z is a fixed version. A URL with a fixed version never changes.
  • integrity has the sha384 hash of that file. The browser does not run the file when the hash is different. Refer to Privacy and security.
  • The file dist/integrity.json in the package lists the hash of dist/lg.js and of each adapter file. The browser checks the hash of an adapter file before it runs that file.

Stub ​

Put the stub before your calls when your code calls the SDK before the script loads:

html
<script>window.lg=window.lg||function(){(lg.q=lg.q||[]).push(arguments)}</script>

The script sends the calls in the queue when it loads. Refer to Client.

Required attributes ​

AttributeDescription
data-keyYour publishable key, lg-pub-live-…. The key gives the source of each event.

Features ​

A feature with the value on or off is a boolean option. on is true, and off is false. Set the attribute to stop or start a feature.

AttributeDefaultValue to stop or change it
data-pageviewsonoff stops page.viewed
data-utmonoff stops the UTM, ad click ID and qp_t capture
data-attributesonoff stops the data-lg-* attributes
data-formsonoff stops the form events. no-identify sends the form events without identifiers.
data-datalayeronoff stops the GTM dataLayer capture
data-consentautomanual waits for a call to consent
data-clicksallon sends only the link and download events. off stops all click events.
data-adaptersonoff stops all adapters. -typeform,-intercom stops only those adapters.
data-scrollonoff stops the scroll depth
data-sample-clicks0.1The part of the sessions that send element.clicked, from 0.01 to 1

dataLayer options ​

AttributeDefaultDescription
data-datalayer-includeemptySends only the event names in the list, with a comma between them. A * matches each character at its position.
data-datalayer-excludeemptyStops the event names in the list. The exclude list wins over the include list.
data-datalayer-email-keyuser_data.emailKey of the email for an automatic identify. An empty value stops the identify from this key.
data-datalayer-user-id-keyuser_idKey of the product user ID for an automatic identify. An empty value stops the identify from this key.

Delivery ​

AttributeDefaultDescription
data-batch-size20Events in one batch
data-batch-interval5000Milliseconds between two batches
data-transportbeaconTransport for the last batch when the page closes: beacon or fetch
data-storagelocalStorageStore of the offline queue: localStorage, memory or none
data-queue-max1000Events in the offline queue
data-retry-base1000First retry delay in milliseconds
data-retry-max300000Largest retry delay in milliseconds
data-endpointhttps://in.quickpipe.aiThe address that receives the events. Set your first party endpoint here.
data-session-timeout1800000Milliseconds without activity before the UTM values and the ad click IDs of the session expire

Adapter settings ​

An adapter reads its settings from attributes with its name, for example data-hubspot-portal. Refer to Adapters.

GTM ​

The QuickPipe template in the GTM Community Template Gallery has the same settings as the script tag. GTM cannot check an integrity hash, so the template loads only a fixed version.