Reference

Event stream reference

Every visitor action on your site, streamed as structured JSON. Events begin flowing as soon as the standard Trust ID tag is installed — no SDK, no visitor login. Envelope, example payloads, join keys, and field references for every event type.

Website tag

trustid.iife.js

Envelope

version · meta · context · payload

Event types

connection · identity · click · scroll · submit · performance

Join keys

user_id · tab_id · socket_id

Enrichment

POST /visitors/enrichment

Install

/developers#quick-start

Advanced Identity SDK (optional)

/developers/identity-sdk

What’s included

Events from the tag, ready to join.

Events are generated automatically after the Trust ID JavaScript tag is installed. No customer authentication or interaction is required.

01

Source.

Every event comes from the Trust ID JavaScript tag on your pages. No SDK is required to produce or receive them.

02

Envelope.

One structure for every event type, with stable join keys.

03

Types.

Connections, pageviews, clicks, scrolls, form submissions, performance and identity.

04

Delivery.

Events land in the Trust ID dashboard and can be forwarded to the destinations you connect.

01 · Envelope

Every visitor action, as structured JSON.

The Trust ID live data feed streams visitor activity from the JavaScript tag as structured JSON events. Every event shares the same envelope — version, meta, context, and payload — so consumers can route, join, and store events without inspecting type-specific fields.

Event envelope

Fields shared by every event in the live data feed

FieldTypeDescription
versionnumberEnvelope schema version. Currently 1.
meta.event_timenumberUnix epoch in milliseconds when the event fired.
meta.sdk_idstringThe snippet or SDK installation that produced the event.
meta.user_idstringStable visitor identifier. Constant across tabs on the same browser.
meta.socket_idstringLive connection identifier. A new value is issued on every connect, including tab refreshes.
meta.device_idstringStable device identifier.
meta.tab_idstringOne identifier per open browser tab.
contextobjectWhere the event happened: url, referrer, page, title, and screen resolution.
payloadobjectEvent-specific body. Empty for disconnect events.

Join events to a visitor with user_id, to a tab with tab_id, and to a single connection with socket_id.

02 · Example events

Eight event types, one shape.

Clickjson
{
  "version": 1,
  "meta": {
    "event_time": 1783612509397,
    "sdk_id": "65b7ec826b734c160584766c",
    "user_id": "6a29c64838b1ff890b958532",
    "socket_id": "iUU19Dux7RfoFDHvAGM8",
    "device_id": "ed50c4b9830f1a8759e675149d0bd2ed",
    "tab_id": "123fc032-b982-4afe-b922-73686d192576"
  },
  "context": {
    "url": "https://shop.example.com/",
    "referrer": "",
    "page": "https://shop.example.com/",
    "title": "Example Shop",
    "screen": {
      "resolution": {
        "width": 2560,
        "height": 1323
      }
    }
  },
  "payload": {
    "tag": "Click : Handcrafted goods, delivered strong",
    "label": "",
    "key_event": false,
    "conversion": false,
    "coords": {
      "x": {
        "client": 1691,
        "offset": 1112,
        "page": 1691
      },
      "y": {
        "client": 929,
        "offset": 30,
        "page": 1405
      }
    },
    "element": {
      "attributes": {},
      "tagName": "strong",
      "nodeType": 1,
      "text": "Handcrafted goods, delive...",
      "offset": {
        "height": 58,
        "width": 1132,
        "left": 134,
        "top": -1
      },
      "scroll": {
        "height": 0,
        "width": 0,
        "left": 0,
        "top": 0
      },
      "boundingClientRect": {
        "x": 713.953125,
        "y": 899.40625,
        "width": 1132.078125,
        "height": 58,
        "top": 899.40625,
        "right": 1846.03125,
        "bottom": 957.40625,
        "left": 713.953125
      },
      "childs": 0
    }
  }
}
Submitjson
{
  "version": 1,
  "meta": {
    "event_time": 1783614951472,
    "sdk_id": "65b7ec826b734c160584766c",
    "user_id": "6a29c64838b1ff890b958532",
    "socket_id": "K3AecYGqQY3Xnl47AJvS",
    "device_id": "ed50c4b9830f1a8759e675149d0bd2ed",
    "tab_id": "3c1cb673-718d-4251-bea2-9b338fbc6cb9"
  },
  "context": {
    "url": "https://shop.example.com/contact",
    "referrer": "",
    "page": "https://shop.example.com/contact",
    "title": "Contact – Example Shop",
    "screen": {
      "resolution": {
        "width": 1546,
        "height": 1323
      }
    }
  },
  "payload": {
    "tag": "Submit : form:nth-of-type(1)",
    "label": "",
    "key_event": false,
    "conversion": false,
    "email": "visitor@example.com",
    "element": {
      "attributes": {},
      "tagName": "form",
      "nodeType": 1,
      "offset": {
        "height": 447,
        "width": 717,
        "left": 415,
        "top": 0
      },
      "scroll": {
        "height": 447,
        "width": 717,
        "left": 0,
        "top": 0
      },
      "boundingClientRect": {
        "x": 414.5,
        "y": 272.421875,
        "width": 717,
        "height": 447.21875,
        "top": 272.421875,
        "right": 1131.5,
        "bottom": 719.640625,
        "left": 414.5
      },
      "childs": 15
    }
  }
}
Scrolljson
{
  "version": 1,
  "meta": {
    "event_time": 1783615269747,
    "sdk_id": "65b7ec826b734c160584766c",
    "user_id": "6a29c64838b1ff890b958532",
    "socket_id": "WdHT9VfujuHu-j1tAICR",
    "device_id": "ed50c4b9830f1a8759e675149d0bd2ed",
    "tab_id": "37124f5c-a208-490e-aa6d-a7500dc5f403"
  },
  "context": {
    "url": "https://shop.example.com/",
    "referrer": "",
    "page": "https://shop.example.com/",
    "title": "Example Shop",
    "screen": {
      "resolution": {
        "width": 2560,
        "height": 1323
      }
    }
  },
  "payload": {
    "percent": 39
  }
}
Connectionjson
{
  "version": 1,
  "meta": {
    "event_time": 1783622782013,
    "sdk_id": "65b7ec826b734c160584766c",
    "user_id": "6a29c64838b1ff890b958532",
    "socket_id": "cCZ2_hmdKs_B20h8AI5d",
    "device_id": "ed50c4b9830f1a8759e675149d0bd2ed",
    "tab_id": "37124f5c-a208-490e-aa6d-a7500dc5f403"
  },
  "context": {
    "url": "https://shop.example.com/",
    "referrer": "",
    "page": "https://shop.example.com/",
    "title": "Example Shop",
    "screen": {
      "resolution": {
        "width": 2560,
        "height": 1323
      }
    }
  },
  "payload": {
    "device": {
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36",
      "type": "desktop",
      "browser": {
        "name": "Chrome",
        "version": "149.0.0.0",
        "major": "149"
      },
      "engine": {
        "name": "Blink",
        "version": "149.0.0.0"
      },
      "os": {
        "name": "macOS",
        "version": "10.15.7"
      }
    },
    "location": {
      "country": "United States",
      "country_code": "US",
      "city": "San Francisco",
      "state": "California",
      "latitude": 37.7749,
      "longitude": -122.4194,
      "timeZone": "America/Los_Angeles",
      "postal_code": "94103"
    }
  }
}
Disconnectjson
{
  "version": 1,
  "meta": {
    "event_time": 1783623744596,
    "sdk_id": "65b7ec826b734c160584766c",
    "user_id": "6a29c64838b1ff890b958532",
    "socket_id": "-3VCW_-QPAHwRcinAKub",
    "device_id": "ed50c4b9830f1a8759e675149d0bd2ed",
    "tab_id": "5281ba54-57ef-43a8-94f3-280560961812"
  },
  "context": {
    "url": "https://shop.example.com/",
    "referrer": "",
    "page": "https://shop.example.com/",
    "title": "Example Shop",
    "screen": {
      "resolution": {
        "width": 2560,
        "height": 1323
      }
    }
  },
  "payload": {}
}
Performancejson
{
  "version": 1,
  "meta": {
    "event_time": 1783624093749,
    "sdk_id": "65b7ec826b734c160584766c",
    "user_id": "6a29c64838b1ff890b958532",
    "socket_id": "JoDhO_mxDVxHnC6GAJDH",
    "device_id": "ed50c4b9830f1a8759e675149d0bd2ed",
    "tab_id": "5281ba54-57ef-43a8-94f3-280560961812"
  },
  "context": {
    "url": "https://shop.example.com/",
    "referrer": "",
    "page": "https://shop.example.com/",
    "title": "Example Shop",
    "screen": {
      "resolution": {
        "width": 2560,
        "height": 1323
      }
    }
  },
  "payload": {
    "scripts": [
      {
        "name": "https://cdn.example.com/analytics/script.js?v=2",
        "load": 42.299999952316284,
        "size": 0,
        "status": "non-blocking"
      },
      {
        "name": "https://cdn.example.com/assets/react.pq9f40wO.mjs",
        "load": 0,
        "size": 144680,
        "status": "non-blocking"
      },
      {
        "name": "https://cdn.example.com/assets/runtime.sMsHqYmK.mjs",
        "load": 0,
        "size": 191,
        "status": "non-blocking"
      },
      {
        "name": "https://chat.example.com/static/javascripts/client.js",
        "load": 0,
        "size": 0,
        "status": "non-blocking"
      }
    ],
    "stylesheets": [
      {
        "name": "https://chat.example.com/static/stylesheets/client.css",
        "load": 0,
        "size": 0,
        "status": "non-blocking"
      }
    ],
    "general": {
      "download": 561.1000000238419,
      "DOMReady": 249.29999995231628,
      "FullyReady": 561.1000000238419,
      "DomInteractive": 249.29999995231628,
      "painting": [
        {
          "name": "first-paint",
          "entryType": "paint",
          "startTime": 308,
          "duration": 0,
          "paintTime": 261.60000002384186,
          "presentationTime": 308
        },
        {
          "name": "first-contentful-paint",
          "entryType": "paint",
          "startTime": 308,
          "duration": 0,
          "paintTime": 261.60000002384186,
          "presentationTime": 308
        }
      ]
    }
  }
}

Identity events

Anonymous recognition — no customer action required. Every visitor gets a session and a readable alias from the first page load.

Known or enriched identity — the fields below appear only when the visitor has submitted a form on your site, or when enrichment is permitted for an already-known customer. The tag never asks a visitor to identify themselves.

Example: known identity after a form submission.json
{
  "version": 1,
  "meta": {
    "event_time": 1784237149789,
    "sdk_id": "68efd96aef6db7011b85faff",
    "user_id": "69dbffe9df05d9726e07c094",
    "socket_id": "T8BCi0GPBAHFkHwIAxnD",
    "device_id": "69dbffe69d9d0cdd5d3b39db",
    "tab_id": "0f3dfa75-39e4-45cf-9344-e4565d7f20af"
  },
  "context": {
    "url": "https://shop.example.com/collections/new-arrivals",
    "referrer": "https://www.google.com/",
    "page": "https://shop.example.com/collections/new-arrivals",
    "title": "New Arrivals – Example Shop",
    "screen": {
      "resolution": {
        "width": 402,
        "height": 754
      }
    }
  },
  "payload": {
    "alias": "Delightful Stonefish",
    "id": "",
    "firstName": "taylor",
    "lastName": "reed",
    "name": "taylor reed",
    "email": "taylor.reed@examplecorp.com",
    "phone": "+15555550123",
    "company": "examplecorp",
    "linkedin_url": "linkedin.com/in/taylor-reed",
    "company_role": "senior consultant, finance"
  }
}
Identity (anonymous)json
{
  "version": 1,
  "meta": {
    "event_time": 1784237329581,
    "sdk_id": "68efd96aef6db7011b85faff",
    "user_id": "6a594d10b89a8381221f0f6a",
    "socket_id": "F_OiSsjEZaNMLEPtA9Li",
    "device_id": "6a594d0f90bfa002f67c9c30",
    "tab_id": "dfd8fbe3-36c9-4451-a345-3a70f43fa43a"
  },
  "context": {
    "url": "https://shop.example.com/our-story",
    "referrer": "https://www.google.com/",
    "page": "https://shop.example.com/our-story",
    "title": "Our Story – Example Shop",
    "screen": {
      "resolution": {
        "width": 1536,
        "height": 774
      }
    }
  },
  "payload": {
    "alias": "Impartial Coral Trout",
    "id": "",
    "firstName": "",
    "lastName": "",
    "name": "",
    "email": "",
    "phone": "",
    "company": "",
    "linkedin_url": "",
    "company_role": ""
  }
}

Event catalog

Interest events are derived from the Trust ID enrichment API (POST /visitors/enrichment). Behavioral and interest example payloads are being finalized and will be added to this reference.

03 · Connection lifecycle

Sockets, tabs, and session timing.

A visitor (user_id) can hold several tabs open at once, each with its own tab_id. Refreshing a tab opens a fresh connection, so the same tab_id reconnects under a new socket_id.

To measure time on a connection, match the socket_id of a connection event to the disconnect event carrying the same value. The difference between the two event_time stamps is the connection duration.

04 · Performance events

Load, resource, and paint timing.

Performance events capture how the page actually loaded for the visitor: per-resource timings for scripts and stylesheets, page-level navigation milestones, and the browser’s paint entries.

scripts[] — one entry per script resource

Fields in each scripts array entry

FieldSourceMeaning
nameresource.nameFull URL of the script that was loaded. Resource identifier.
loadresource.durationHow long the resource took, in milliseconds — from request start (startTime) to responseEnd. 42.29 = 42 ms. A 0 means the browser served it from cache (memory or disk), or the timing was effectively instant so no network time was recorded.
sizeresource.decodedBodySizeSize of the resource body in bytes, after decompression — the actual JS payload size, not the compressed transfer size. 144680 ≈ 141 KB. 0 usually means it came from cache, or size is hidden (cross-origin without Timing-Allow-Origin).
statusresource.renderBlockingStatusWhether the resource blocked rendering: blocking or non-blocking. Non-blocking scripts (async, defer, module) do not hold up first paint.

stylesheets[] — same shape, for CSS

Same four fields as scripts[], built from link resources whose URL matches .css. name is the stylesheet URL; load, size, and status mean the same as above.

general — page-level navigation timing

All values are milliseconds relative to navigation start, when the browser began loading the page.

Page-level navigation timing fields

FieldSourceMeaning
downloadpageTiming.durationTotal page load time — navigation start to loadEventEnd, the whole document fully loaded. 561ms in the sample.
DOMReadydomContentLoadedEventStartWhen DOMContentLoaded fired — HTML parsed and DOM built, though images and stylesheets may still be loading. 249ms. Roughly “page is interactive-ready.”
FullyReadyloadEventEndWhen the load event finished — images, scripts, and styles all done loading. 561ms. Matches download here because both mark the end of load.
DomInteractivedomInteractiveWhen the browser finished parsing HTML and set document.readyState = "interactive", just before running deferred scripts and firing DOMContentLoaded. 249ms.

general.painting[] — paint timing

Verbatim output of performance.getEntriesByType('paint') — the browser’s paint milestones. Each entry is a PerformancePaintTiming.

first-paintFP

Moment the browser rendered anything at all — the first pixel different from the previous page, such as a background color. startTime: 308 ms.

first-contentful-paintFCP

Moment the browser rendered the first actual content — text, image, or SVG. The key user-perceived “something is showing up” metric. startTime: 308 ms.

FieldMeaning
startTimeWhen the paint occurred, in ms from navigation start. This is the number you actually care about.
entryTypeAlways paint.
durationAlways 0 for paint entries — they are instantaneous marks, not intervals.
paintTime / presentationTimeFiner-grained sub-timings. paintTime is when the browser painted; presentationTime is when the frame was actually shown on screen. startTime is generally derived from presentationTime.

05 · Identity events

Who is behind the connection.

Every connection produces exactly one identity event, delivered immediately after the connection event. Identified visitors arrive with their enrichment traits filled in; anonymous visitors carry only their Trust ID assigned alias. When an anonymous visitor is resolved mid-session, an additional identity event is emitted with the updated traits.

The full identity payload is served by the Trust ID enrichment API at POST /visitors/enrichment; raw events in the stream carry a reference identifier, and the enrichment call returns the complete trait set. Form submit events follow the same resolution pathway and are delivered as their own event type.

Identity traits

Traits returned for identified visitors

TraitDescription
aliasReadable alias Trust ID assigns to every visitor, anonymous or identified.
idExternal identifier, when provided.
firstName, lastName, nameResolved name.
emailResolved email address.
phoneResolved phone number.
companyResolved employer.
linkedin_urlLinkedIn profile.
company_roleRole at the resolved company.

Anonymous visitors return the alias with every other trait empty.

06 · Resources

Related references and support.

Developer docs.Trust ID developer documentation — quick start, what the tag does, identity resolution, data delivery, security and troubleshooting.
Advanced Identity SDK.Optional. Portable identity, credentials, authentication and proofs — not required for the standard deployment.
Enrichment.POST /visitors/enrichment — full identity payloads for resolved visitors. See Identity events.
Support.info@tracerlabs.com for integration support.

Need help?

Contact our engineering team at info@tracerlabs.com for integration support, or talk to a solutions engineer.

Start with the tag.

Install it today and see these events in the dashboard on the next page load. If you want a walkthrough, we’ll pair you with a solutions engineer.

We use cookies and similar technologies to measure site performance and support marketing. Optional tags load only after you choose. See our Privacy Policy.