Privacy and security
This page tells which data the SDK sends and stores, how it uses consent, and how to protect your pages.
Data that the SDK sends
| Data | Example |
|---|---|
| Event name and properties | pricing.viewed with { "plan": "pro" } |
| Page | The address, the referrer and the title |
| UTM values | utm_source=newsletter |
Ad click IDs, only after consent for analytics and ads | gclid=Cj0KCQjw |
| Identifiers | The visitor ID after consent, an email address from a form or from identify |
| Device | The user agent and the language of the browser |
QuickPipe receives the IP address of the request. It uses the IP address to find the country and the city, and to stop automated traffic.
Data that the SDK never sends
- The text of a
textareafield - Password, one-time code, payment, hidden and card fields
- Personal identity numbers
- Form fields that the SDK cannot identify, unless you add them with
data-lg-capture
Use beforeSend in the npm client to change or drop an event before it leaves the browser.
Consent
The default consent mode is auto. In this mode, the SDK reads the consent from these sources:
- Google Consent Mode v2: the values
analytics_storage,ad_storageandad_user_datain thedataLayer - The
Cookiebot,CookieYesandOneTrustadapters
In manual mode, the SDK waits for a call to consent:
lg.consent({ analytics: 'granted', ads: 'denied' });The table gives the analytics state. The SDK sends ad data only when the ads state is also granted.
| State | What the SDK does |
|---|---|
unknown | It stores no visitor ID. It keeps the UTM values and the click IDs of the session in memory only. It sends the UTM values with each event. The events have context.consent: "unknown", no ID and no click ID. QuickPipe counts them and keeps them only in traffic statistics without an identifier of a person. |
granted | It stores the visitor ID and sends it with each event. It stores the UTM values of the session. It stores and sends the click IDs only when the purpose ads is granted too. The events have context.consent: "granted". |
denied | It deletes the visitor ID, the UTM values and the click IDs of the session. It also removes them from each event that it did not send yet. Then it asks QuickPipe to erase the data of that ID. It sends events with context.consent: "denied" and without an ID, a UTM value or a click ID. QuickPipe only counts them. |
Browser storage
| Name | Store | Content | Time |
|---|---|---|---|
lg_aid | First party cookie and localStorage | The visitor ID, after consent for analytics | 13 months after the last visit |
lg-session-<key> | localStorage | The UTM values and the ad click IDs of the session. The SDK stores the UTM values after consent for analytics, and the click IDs after consent for analytics and ads. | Until the session ends, 30 minutes after the last event by default |
| Offline queue | localStorage | Events, and requests to erase a visitor ID, that the SDK did not send yet | Until the SDK sends them |
The SDK writes no UTM value and no click ID before the visitor gives consent. Before consent, both stay in memory only. A denial deletes them from memory, from localStorage and from each event that the SDK did not send yet. The option utm: false also stops the send of each UTM value and each click ID and deletes the values of a stored session. A request to erase a visitor ID that fails stays in the queue, and the SDK sends it again.
Safari keeps cookies that a script sets for a maximum of 7 days. To keep the visitor ID longer in Safari, send the events through a path of your website, for example /_lg. Refer to Use a first party endpoint.
Integrity
Use a URL with a fixed version and the integrity attribute. The browser then does not run a file that someone changed.
<script async src="https://cdn.jsdelivr.net/npm/@quickpipeaiab/[email protected]/dist/lg.js"
integrity="sha384-…" crossorigin="anonymous"
data-key="lg-pub-live-…"></script>QuickPipe gives you the exact line. Each package version has the file integrity.json with the sha384 hash of each browser file. The GitHub release of each version also has this file.
The browser checks the hash of each adapter file before it runs the file.
GTM cannot check an integrity hash. The QuickPipe GTM template loads only a fixed version.
Content Security Policy
The SDK operates with a strict Content Security Policy. It uses no eval and no inline styles, and it is compatible with Trusted Types. Add these values to your policy:
| Directive | Value |
|---|---|
script-src | https://cdn.jsdelivr.net |
connect-src | https://in.quickpipe.ai, or your first party endpoint |
Keys
| Key | Where to use it |
|---|---|
Publishable key, lg-pub-live-… | In the browser and in mobile apps. It can send events, and it can erase the visitor ID that it sends. |
Secret key, lg-sec-live-… | Only on your servers. Keep it in a secret store. |
The SDK refuses a secret key in a browser. Each key belongs to one source, and the key gives the source of each event.
Erasure of a visitor ID
When the visitor denies consent, the SDK asks QuickPipe to erase the visitor ID:
- When the person has other identifiers, for example an email address, QuickPipe removes only the visitor ID and the events that it sent.
- When the visitor ID is the only identifier, QuickPipe erases the anonymous person.