Direct HTTP Integration
This document describes the payload format expected by the Splio web collector endpoint. This is an alternative to the GTM implementation described here: https://dev-scp.splio.com/docs/web-tracking.
Prerequisites
Before implementing your tracker, Splio will provide you with two configuration settings:
| Setting | Description |
|---|---|
| Collector URL | The full endpoint URL including your tenant identifier, e.g. https://collector.example.com/collector/v1/a1b2c3d4-5678-90ab-cdef-1234567890ab/com.snowplowanalytics.snowplow/tp2 |
| App ID | The sub-tenant identifier to use in every event payload (the aid field). Identifies your site/shop within Splio |
These settings are specific to your account and will be communicated to you during onboarding.
All requests must be sent as POST with Content-Type: application/json. The collector responds 200 ok on success and 400 ko on error.
Root Payload Structure
{
"schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
"data": [ { /* one or more event objects */ } ]
}| Key | Type | Description |
|---|---|---|
schema | string | Must be iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4 |
data | array | Array of event objects. Multiple events can be batched in a single request |
Event Object Fields
Each object in data uses Snowplow tracker protocol short keys:
| Key | Type | Required | Label / Description |
|---|---|---|---|
e | string | Yes | Event type. pv = page view, ue = self-describing event, se = custom structured event |
eid | string | Yes | Event ID. UUID to uniquely identify this event |
aid | string | Yes | App ID / Sub-tenant ID. Identifies your sub-tenant (shop, site). Value provided by Splio (see Prerequisites) |
tna | string | Yes | Tracker namespace. Identifier of your tracker instance |
dtm | string | Yes | Device timestamp. Unix epoch in milliseconds when the event occurred |
stm | string | No | Sent timestamp. Unix epoch in milliseconds when the event was sent |
tv | string | Yes | Tracker version. E.g. js-3.16.0 |
p | string | Yes | Platform. web, mob, pc, srv, app, tv, cnsl, iot |
url | string | Yes | Page URL. Full URL of the current page |
page | string | No | Page title. Human-readable page name |
refr | string | No | Page referrer. URL of the previous page |
uid | string | Yes | User ID. Business-level user identifier set by your application. Used as primary anonymous user identifier (fallback: duid, then sid) |
duid | string | No | Domain user ID. First-party cookie-based user identifier |
sid | string | No | Session ID. UUID identifying the current browsing session |
vid | integer | No | Visit index. Number of sessions for this user |
cookie | string | No | Cookie flag. "1" if cookies are enabled |
cs | string | No | Charset. Document character encoding, e.g. UTF-8 |
lang | string | No | Language. Browser language, e.g. en-US, fr-FR |
res | string | No | Screen resolution. Format WIDTHxHEIGHT, e.g. 1920x1080 |
cd | string | No | Color depth. E.g. 24 |
tz | string | No | Timezone. IANA timezone, e.g. Europe/Paris |
vp | string | No | Viewport size. Format WIDTHxHEIGHT |
ds | string | No | Document size. Format WIDTHxHEIGHT |
cx | string | No | Contexts (base64). Base64-encoded JSON containing context entities (see below) |
ue_px | string | No | Self-describing event payload (base64). Base64-encoded JSON (see below) |
Contexts
Contexts provide additional data attached to any event. They are sent as a JSON structure base64-encoded in cx:
{
"schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
"data": [
{ "schema": "...", "data": { ... } }
]
}Supported Contexts
Web Page Context
Schema: iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0
| Key | Type | Label / Description |
|---|---|---|
id | string | Page ID. UUID uniquely identifying this page view |
Logged User Context
Schema: jsonschema:com.splio/logged_user/1-0-0
| Key | Type | Label / Description |
|---|---|---|
userId | string | User ID. Identifier of the logged-in user |
| (Note: if the user id is an email, it must be hashed with SHA256) | ||
sourceId | string | Source ID. Identifier of the user source system |
Product Context
Schema: jsonschema:com.splio/product/1-0-0
Attach this context to a page view (e=pv) to signal a product view.
| Key | Type | Label / Description |
|---|---|---|
productSKU | string | Product SKU. Unique product identifier. Must be non-empty to be recognized as a product view |
Thank You Page Context
Schema: jsonschema:com.splio/thank_you_page/1-0-0
Attach this context to a page view (e=pv) to signal a post-purchase confirmation page.
| Key | Type | Label / Description |
|---|---|---|
purchase_completed | string | Purchase completed flag. Must be non-empty to be recognized as a thank-you page view |
Self-Describing Event Payloads
For events with e=ue or e=se, the specific payload is sent base64-encoded in ue_px:
{
"schema": "iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",
"data": {
"schema": "<event-specific-schema>",
"data": { /* event fields */ }
}
}Add to Cart
Schema: iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0
| Key | Type | Label / Description |
|---|---|---|
sku | string | Product SKU. Unique product identifier |
quantity | long | Quantity. Number of items added |
name | string | Product name |
category | string | Product category |
unitPrice | decimal | Unit price |
currency | string | Currency. ISO 4217 code, e.g. USD, EUR |
Remove from Cart
Schema: iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0
| Key | Type | Label / Description |
|---|---|---|
sku | string | Product SKU. Unique product identifier |
quantity | long | Quantity. Number of items removed |
name | string | Product name |
category | string | Product category |
unitPrice | decimal | Unit price |
currency | string | Currency. ISO 4217 code, e.g. USD, EUR |
Event Type Summary
| Event | Snowplow e value | How to trigger |
|---|---|---|
| Page View | pv | Send a pv event without product or thank-you context |
| Product View | pv | Send a pv event with a com.splio/product context containing a non-empty productSKU |
| Thank You Page View | pv | Send a pv event with a com.splio/thank_you_page context containing a non-empty purchase_completed |
| Add to Cart | ue or se | Send with add_to_cart schema in self-describing payload |
| Remove from Cart | ue or se | Send with remove_from_cart schema in self-describing payload |
Examples
Page View
{
"schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
"data": [
{
"e": "pv",
"url": "<https://myshop.com/>",
"page": "Home Page",
"refr": "<https://google.com/>",
"eid": "327cb43a-99d1-457f-b51b-838e42cdefec",
"tv": "js-3.16.0",
"tna": "myTracker",
"aid": "<APP_ID>",
"p": "web",
"cookie": "1",
"cs": "UTF-8",
"lang": "fr-FR",
"res": "1280x800",
"cd": "24",
"dtm": "1697027286353",
"vp": "1280x661",
"ds": "1280x661",
"vid": "7",
"sid": "497da6e9-eddb-4e7a-be53-a1f68e91f0ab",
"duid": "00d82103-2908-4498-ad5c-f726ebad36bc",
"cx": "eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9jb250ZXh0cy9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6W3sic2NoZW1hIjoiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvd2ViX3BhZ2UvanNvbnNjaGVtYS8xLTAtMCIsImRhdGEiOnsiaWQiOiJhMWIyYzNkNC1lNWY2LTc4OTAtYWJjZC1lZjEyMzQ1Njc4OTAifX1dfQ==",
"stm": "1697027291931"
}
]
}Contexts (decoded cx):
{
"schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
"data": [
{
"schema": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
"data": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
}
]
}Product View
{
"schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
"data": [
{
"e": "pv",
"url": "<https://myshop.com/product/876661122392077>",
"page": "Cool T-Shirt - MyShop",
"eid": "48ac2222-45d5-4006-8f7a-128f22ea9867",
"tv": "js-3.16.0",
"tna": "myTracker",
"aid": "<APP_ID>",
"p": "web",
"cs": "UTF-8",
"lang": "en-US",
"res": "2100x1313",
"cd": "24",
"tz": "Europe/Paris",
"dtm": "1701194783907",
"sid": "4a4cbcfd-243f-433f-a4f6-7cffffb7e252",
"duid": "662fc3c6-2f63-4e33-b53c-cdc9656c2b14",
"cx": "eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9jb250ZXh0cy9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6W3sic2NoZW1hIjoianNvbnNjaGVtYTpjb20uc3BsaW8vcHJvZHVjdC8xLTAtMCIsImRhdGEiOnsicHJvZHVjdFNLVSI6IjkxOTc5MDc1NDM0NDU2NzYifX0seyJzY2hlbWEiOiJqc29uc2NoZW1hOmNvbS5zcGxpby9sb2dnZWRfdXNlci8xLTAtMCIsImRhdGEiOnsidXNlcklkIjoidXNyLTAwMDQyIiwic291cmNlSWQiOiJzaG9wcGluZy1zaXRlIn19LHsic2NoZW1hIjoiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvd2ViX3BhZ2UvanNvbnNjaGVtYS8xLTAtMCIsImRhdGEiOnsiaWQiOiJiMmMzZDRlNS1mNmE3LTg5MDEtYmNkZS1mMjM0NTY3ODkwMTIifX1dfQ==",
"stm": "1701194783908"
}
]
}Contexts (decoded cx):
{
"schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
"data": [
{
"schema": "jsonschema:com.splio/product/1-0-0",
"data": { "productSKU": "9197907543445676" }
},
{
"schema": "jsonschema:com.splio/logged_user/1-0-0",
"data": { "userId": "usr-00042", "sourceId": "shopping-site" }
},
{
"schema": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
"data": { "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012" }
}
]
}Thank You Page View
Same as a Page View (e=pv) with a thank-you page context:
{
"schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
"data": [
{
"e": "pv",
"url": "<https://myshop.com/checkout/thank-you>",
"page": "Thank You - MyShop",
"eid": "d4e5f6a7-b8c9-0123-def4-567890123456",
"tv": "js-3.16.0",
"tna": "myTracker",
"aid": "<APP_ID>",
"p": "web",
"dtm": "1701194800000",
"duid": "662fc3c6-2f63-4e33-b53c-cdc9656c2b14",
"cx": "eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9jb250ZXh0cy9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6W3sic2NoZW1hIjoianNvbnNjaGVtYTpjb20uc3BsaW8vdGhhbmtfeW91X3BhZ2UvMS0wLTAiLCJkYXRhIjp7InB1cmNoYXNlX2NvbXBsZXRlZCI6InRydWUifX0seyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy93ZWJfcGFnZS9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6eyJpZCI6ImMzZDRlNWY2LWE3YjgtOTAxMi1jZGVmLTM0NTY3ODkwMTIzNCJ9fV19",
"stm": "1701194800001"
}
]
}Contexts (decoded cx):
{
"schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
"data": [
{
"schema": "jsonschema:com.splio/thank_you_page/1-0-0",
"data": { "purchase_completed": "true" }
},
{
"schema": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
"data": { "id": "c3d4e5f6-a7b8-9012-cdef-345678901234" }
}
]
}Add to Cart
{
"schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
"data": [
{
"e": "ue",
"eid": "6a70302f-982e-4bab-8af3-519fc3b84f84",
"tv": "js-3.16.0",
"tna": "myTracker",
"aid": "<APP_ID>",
"p": "web",
"cs": "UTF-8",
"lang": "en-US",
"res": "1680x1050",
"cd": "24",
"tz": "Europe/Paris",
"dtm": "1697757327323",
"sid": "f47d0c2c-1e09-4933-b7a8-d125ab2119f9",
"duid": "22695db9-63e1-41a1-adea-dcc81f64b619",
"url": "<https://myshop.com/>",
"refr": "<https://myshop.com/product/8552515751438644>",
"ue_px": "eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy91bnN0cnVjdF9ldmVudC9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9hZGRfdG9fY2FydC9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6eyJza3UiOiI4NTUyNTE1NzUxNDM4NjQ0IiwicXVhbnRpdHkiOjEsIm5hbWUiOiJDcm9wcGVkIFN0YXkgR3Jvb3Z5IG9mZiB3aGl0ZSIsImNhdGVnb3J5IjoidC1zaGlydCIsInVuaXRQcmljZSI6MTAuOSwiY3VycmVuY3kiOiJVU0QifX19",
"cx": "eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9jb250ZXh0cy9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6W3sic2NoZW1hIjoianNvbnNjaGVtYTpjb20uc3BsaW8vbG9nZ2VkX3VzZXIvMS0wLTAiLCJkYXRhIjp7InVzZXJJZCI6InVzci0wMDA0MiIsInNvdXJjZUlkIjoic2hvcHBpbmctc2l0ZSJ9fSx7InNjaGVtYSI6ImlnbHU6Y29tLnNub3dwbG93YW5hbHl0aWNzLnNub3dwbG93L3dlYl9wYWdlL2pzb25zY2hlbWEvMS0wLTAiLCJkYXRhIjp7ImlkIjoiZDRlNWY2YTctYjhjOS0wMTIzLWRlZjQtNTY3ODkwMTIzNDU2In19XX0=",
"stm": "1697757327324"
}
]
}Self-describing payload (decoded ue_px):
{
"schema": "iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",
"data": {
"schema": "iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0",
"data": {
"sku": "8552515751438644",
"quantity": 1,
"name": "Cropped Stay Groovy off white",
"category": "t-shirt",
"unitPrice": 10.9,
"currency": "USD"
}
}
}Contexts (decoded cx):
{
"schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
"data": [
{
"schema": "jsonschema:com.splio/logged_user/1-0-0",
"data": { "userId": "usr-00042", "sourceId": "shopping-site" }
},
{
"schema": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
"data": { "id": "d4e5f6a7-b8c9-0123-def4-567890123456" }
}
]
}Remove from Cart
Identical to Add to Cart, but the self-describing payload uses:
"schema": "iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0"
How to Implement
For JavaScript implementation details (tracker setup, event tracking code), refer to the Javascript Snowplow Libraries guide.
Updated 2 days ago