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.Zis a fixed version. A URL with a fixed version never changes.integrityhas thesha384hash of that file. The browser does not run the file when the hash is different. Refer to Privacy and security.- The file
dist/integrity.jsonin the package lists the hash ofdist/lg.jsand 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
| Attribute | Description |
|---|---|
data-key | Your 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.
| Attribute | Default | Value to stop or change it |
|---|---|---|
data-pageviews | on | off stops page.viewed |
data-utm | on | off stops the UTM, ad click ID and qp_t capture |
data-attributes | on | off stops the data-lg-* attributes |
data-forms | on | off stops the form events. no-identify sends the form events without identifiers. |
data-datalayer | on | off stops the GTM dataLayer capture |
data-consent | auto | manual waits for a call to consent |
data-clicks | all | on sends only the link and download events. off stops all click events. |
data-adapters | on | off stops all adapters. -typeform,-intercom stops only those adapters. |
data-scroll | on | off stops the scroll depth |
data-sample-clicks | 0.1 | The part of the sessions that send element.clicked, from 0.01 to 1 |
dataLayer options
| Attribute | Default | Description |
|---|---|---|
data-datalayer-include | empty | Sends only the event names in the list, with a comma between them. A * matches each character at its position. |
data-datalayer-exclude | empty | Stops the event names in the list. The exclude list wins over the include list. |
data-datalayer-email-key | user_data.email | Key of the email for an automatic identify. An empty value stops the identify from this key. |
data-datalayer-user-id-key | user_id | Key of the product user ID for an automatic identify. An empty value stops the identify from this key. |
Delivery
| Attribute | Default | Description |
|---|---|---|
data-batch-size | 20 | Events in one batch |
data-batch-interval | 5000 | Milliseconds between two batches |
data-transport | beacon | Transport for the last batch when the page closes: beacon or fetch |
data-storage | localStorage | Store of the offline queue: localStorage, memory or none |
data-queue-max | 1000 | Events in the offline queue |
data-retry-base | 1000 | First retry delay in milliseconds |
data-retry-max | 300000 | Largest retry delay in milliseconds |
data-endpoint | https://in.quickpipe.ai | The address that receives the events. Set your first party endpoint here. |
data-session-timeout | 1800000 | Milliseconds 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.