Skip to content

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:

EventWhen
page.viewedThe page loads, and each route change in a single page app
form.submittedA visitor submits a form
link.clickedA visitor clicks a link to a different site
file.downloadedA visitor clicks a link to a file
element.clickedA visitor clicks a different element
scroll.reachedThe visitor scrolls to 25, 50, 75 and 100 percent of the page
Events of the GTM dataLayerYour site pushes an object with an event key
Events of adaptersA 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 ​

  1. The SDK puts each event in a batch.
  2. It sends the batch when the batch has 20 events, or after 5 seconds.
  3. When the visitor closes the page, it sends one batch with fetch and its option keepalive, under 64 KB. The events that do not fit stay in the offline queue.
  4. When a send fails, it keeps the events in localStorage and tries again. The first delay is 1 second. Each retry doubles the delay, up to 5 minutes.
  5. 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.

SubjectHow the SDK gets it
Anonymous subjectAfter consent, the SDK makes a visitor ID and keeps it in the cookie lg_aid
Identified personYour code calls identify, a form gives an email address, or the visitor opens a QuickPipe email link
CompanyYour 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.

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.

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 textarea field
  • 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