Skip to content

12Integrations and data

Offline events

How to send CRM deals, payments and calls to Gauss and link them to the ad campaign of the lead, by order or lead ID or by attribution stored in your CRM.

Offline events are things that happen outside the site: a sales rep qualified a lead, a customer paid an invoice, received an order or left a review. Your server sends them (CRM, store backend, Zapier or n8n), and Gauss shows revenue and lead-to-customer conversion by channel and campaign.

Coming soon. The offline events API is not live yet. Below is how it will work. The request format may change before launch.

Why you need it

The site only sees the lead. The money comes later, in the CRM: a day, a week or a month after. Without offline events you can see which campaign brings leads, but not which one brings customers and revenue. Offline events close that gap:

  • revenue and ROMI including CRM deals;
  • a lead funnel by campaign: lead → qualified → customer;
  • cost per customer, not only cost per lead;
  • number of reviews and average rating by channel.

How an event is linked to an ad

Gauss has no identifier for a person that lasts longer than a day, so a deal five days later cannot be tied to the visit the way GA4 does it with a cookie. The CRM carries the link instead. There are two ways.

By order or lead ID — the main way

If the conversion on the site has an ID that your CRM knows, the CRM doesn't need to store anything extra.

  1. On the site, send the lead with its CRM ID in lead_id (or a purchase with transaction_id):

    js
    gauss('event', 'generate_lead', { lead_id: 'L-58213' });
  2. Gauss remembers the channel, UTM tags and landing page of this conversion. The ID itself is not stored, only its hash.

  3. When something happens in the CRM, your server sends the event with the same lead_id or transaction_id. Gauss finds the conversion by the hash and takes the attribution from it.

The link lasts 90 days. If the offline event arrives later or the ID is not found, and the event has no attribution field, it goes to the “Unknown” channel.

Attribution from the CRM

If there is no ID on the site or the conversion did not happen on the site (for example, a phone call), the CRM stores the lead's attribution and sends it in the event's attribution field: channel, UTM tags, landing page and its category.

Coming soon. The tracker function gauss.attribution(), which returns the current visit's attribution for hidden form fields. Tags from the first page of a visit won't be lost even if the person viewed several pages.

If an event has both an ID and attribution, the attribution found by the ID wins.

Request format

The format may change before launch.

POST https://app.gausslab.io/api/v1/offline-events — server-side only, with a site token in the Authorization: Bearer … header. Up to 500 events per request.

json
{
  "events": [
    {
      "name": "close_convert_lead",
      "occurred_at": "2026-10-30T14:05:00Z",
      "idempotency_key": "crm-deal-58213-won",
      "params": { "value": 600, "currency": "USD", "lead_id": "L-58213" }
    },
    {
      "name": "submit_review",
      "occurred_at": "2026-11-02T09:00:00Z",
      "idempotency_key": "review-9921",
      "params": { "rating": 5 },
      "attribution": { "channel": "social", "utm_source": "linkedin", "utm_campaign": "oct_promo" }
    }
  ]
}

The response is 202 with a result for each event: accepted, duplicate or rejected with a reason.

FieldRule
nameevent name — from the list below or your own, following the general naming rules
occurred_atwhen the event happened; no earlier than 90 days ago and no later than 1 hour from now
idempotency_keyrequired; a repeat with the same key does not create a second event and returns duplicate
paramsas for site events; value and currency for revenue, rating from 1 to 5 for reviews
params.transaction_id, params.lead_idorder or lead ID to link to the conversion on the site; stored only as a hash
attributionattribution fields from the CRM; needed when there is no ID; can be partial

Idempotency lets you safely retry a request after a network error: an event with the same idempotency_key won't double revenue.

Event names

For leads, use the GA4 vocabulary:

EventWhen to send
qualify_leadthe lead is qualified
disqualify_leadthe lead is rejected
working_leadthe lead is being worked on
close_convert_leadthe lead became a customer
close_unconvert_leadthe deal closed without a purchase

For purchases — purchase and refund. Your own events follow the general rules, for example submit_review or order_delivered.

What you must not send

Email, phone, name, user_id, client_id, hashes of email or phone and any other identifiers of a person. A request with such fields is rejected as a whole (rejected: personal_data) rather than silently cleaned, so the integration can be fixed right away. Rejected events are visible in debugging.

What Gauss stores

An offline event is not linked to any visit: it is stored as a separate record with attribution — channel, campaign and landing page, without the path through the site. The order or lead ID is stored only as a hash. Reports are aggregated: data for a specific order cannot be viewed in the dashboard or through the API. More about data — What data is collected.

Apply for the beta

The beta is closed and limited to 20–30 sites. We review every application and reply by email with the price and terms.

Without https:// or a path.