How the SDK works
This page tells what the SDK does on your pages and in your apps. QuickPipe uses the events to score your leads and their companies.
flowchart LR
P[Your page] --> S[SDK]
S -->|batches of events| Q[QuickPipe]
S -.->|offline queue| B[(Browser storage)]
B -.->|retry| Q
What the SDK sends
The SDK sends events. An event has a name, properties, the page, the UTM values and ad click IDs of the session, and the identifiers of the visitor.
The SDK sends some events automatically:
| Event | When |
|---|---|
page.viewed | The page loads, and each route change in a single page app |
form.submitted | A visitor submits a form |
link.clicked | A visitor clicks a link to a different site |
file.downloaded | A visitor clicks a link to a file |
element.clicked | A visitor clicks a different element |
scroll.reached | The visitor scrolls to 25, 50, 75 and 100 percent of the page |
Events of the GTM dataLayer | Your site pushes an object with an event key |
| Events of adapters | A vendor tool on the page, for example a HubSpot form, sends an event |
You can stop each of these features. Refer to Script tag and Automatic events.
You send your own events with track, or with data attributes on your page elements. Refer to Client and Data attributes.
How the SDK delivers events
- The SDK puts each event in a batch.
- It sends the batch when the batch has 20 events, or after 5 seconds.
- When the visitor closes the page, it sends one batch with
fetchand its optionkeepalive, under 64 KB. The events that do not fit stay in the offline queue. - When a send fails, it keeps the events in
localStorageand tries again. The first delay is 1 second. Each retry doubles the delay, up to 5 minutes. - The offline queue keeps a maximum of 1000 events.
A call to track never stops your code. When an event is not correct, the SDK drops it and writes the reason in the console in debug mode.
Visitors, people and companies
QuickPipe has two kinds of subject: a person and a company. A visitor is a person. A person with only a visitor ID is an anonymous subject. Each other person is an identified person. A lead is an identified person with a lead ID in QuickPipe.
| Subject | How the SDK gets it |
|---|---|
| Anonymous subject | After consent, the SDK makes a visitor ID and keeps it in the cookie lg_aid |
| Identified person | Your code calls identify, a form gives an email address, or the visitor opens a QuickPipe email link |
| Company | Your code calls account, or a form gives a company website, a company number or a VAT number |
When a visitor gives an email address, QuickPipe joins the earlier events of that visitor to the person.
UTM values and email links
On the first page of a visit, the SDK reads the five utm_ parameters of the address. It also reads the ad click IDs, for example gclid and fbclid. It adds these values to each event of the session. The click IDs go only with events after consent for analytics and ads. A session ends after 30 minutes without activity.
QuickPipe adds the parameter qp_t to the links in its emails. The SDK reads this parameter, removes it from the address bar and identifies the visitor. Thus a click in an email connects the visit to the person.
Consent
Before consent, the SDK stores no visitor ID. It sends events without an ID, and QuickPipe only counts them.
After consent, the SDK stores the visitor ID for 13 months. When the visitor denies consent, the SDK deletes the ID, and QuickPipe removes that ID and its events. Refer to Privacy and security.
What 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