Pub/Sub Schema
Learn more about the Elevar Pub Sub event schema
Overview
Pub Sub Payload Examples:
This guide will outline the general shape of the Elevar Pub Sub payloads.
These payload samples do not constitute an exhaustive list of all events you'll receive. To see a list of all events read this article. We encourage you to examine the events in your stream to get more details on customer
, order
and other objects/properties in the payloads.
Add To Cart:
{
"cookies": {
},
"landingSite": {
},
"visitorInfo": {
"session_count": "1",
"session_id": "1715359893",
"user_id": "5a27c0b2-4a13-4538-bee9-23f044e385eb"
},
"customerInfo": {
"ip": "123.123.123.123",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"_enriched": [
]
},
"domain": "mydomain.myshopify.com",
"event": {
"event_name": "dl_add_to_cart",
"id": "0f871130-35ea-40ad-a684-1913a477190c",
"event_time": "2024-05-10T16:51:59.800Z",
"currencyCode": "USD",
"checkout": {
},
"order": {
},
"products": [
{
"quantity": 1,
"list": "/collections/all",
"variant": {
"id": "36505719603356",
"sku": "36505719603356",
"price": 69.99,
"image": "https://cdn.shopify.com/s/files/1/0409/2192/3740/products/dark-wall-bedside-table_925x_945b3c95-7232-4b44-8ded-c44adce518d9.jpg?v=1602859319",
"url": "https://mydomain.myshopify.com/products/bedside-table?variant=36505719603356",
"product": {
"id": "5777972134044",
"title": "Bedside Table",
"vendor": "Company 123",
"category": "Indoor"
}
}
}
],
"values": {
},
"browser": {
"page_title": "Bedside Table – Local - GTM Suite Testing",
"page_url": "https://mydomain.myshopify.com/products/bedside-table",
"language": "en-US",
"screen_resolution": "3072x1728"
},
"discountCodes": [
],
"customer": {
}
}
}
Add Shipping Info:
{
"cookies": {
},
"landingSite": {
},
"visitorInfo": {
"user_id": "5a27c0b2-4a13-4538-bee9-23f044e385eb",
"session_id": "1715359893",
"session_count": "1"
},
"customerInfo": {
"ip": "123.123.123.123",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"lastName": "Test",
"street1": "123 Test St",
"city": "Charleston",
"zip": "90210",
"provinceCode": "CA",
"countryCode": "US",
"customerId": "4166461718684",
"phone": "+11231231234",
"firstName": "T",
"_enriched": [
"ip",
"userAgent"
]
},
"domain": "mydomain.myshopify.com",
"event": {
"event_name": "dl_add_shipping_info",
"id": "32666273087644",
"event_time": "2024-05-10T16:51:38+00:00",
"currencyCode": "USD",
"checkout": {
"id": "32666273087644",
"token": "22adc6391a843587d727849bc47cc82c"
},
"order": {
},
"products": [
{
"quantity": 1,
"variant": {
"id": "42739677462684",
"sku": "beanbag-black",
"price": 69.99,
"title": "Black",
"product": {
"id": "5777972101276",
"title": "Black Beanbag",
"vendor": "Company 123"
}
}
},
{
"quantity": 2,
"variant": {
"id": "36505719603356",
"price": 69.99,
"product": {
"id": "5777972134044",
"title": "Bedside Table",
"vendor": "Company 123"
}
}
}
],
"values": {
"revenue": "228.87",
"subtotal": "209.97",
"product_subtotal": "209.97",
"tax": "18.90",
"shipping": "0"
},
"browser": {
"page_url": "https://mydomain.myshopify.com/40921923740/checkouts/ac/Z2NwLXVzLWVhc3QxOjAxSFhIUE5QN0g2RzE0SjBFMDEzS0pDQzha/recover"
},
"discountCodes": [
],
"customer": {
"id": "4166461718684"
}
}
}
Purchase:
{
"cookies": {
},
"landingSite": {
},
"visitorInfo": {
"session_count": "1",
"session_id": "1715359893",
"user_id": "5a27c0b2-4a13-4538-bee9-23f044e385eb"
},
"customerInfo": {
"ip": "123.123.123.123",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"lastName": "T",
"street1": "123 Test St",
"city": "Charleston",
"zip": "90210",
"provinceCode": "CA",
"countryCode": "US",
"customerId": "4166461718684",
"phone": "+11231231234",
"firstName": "T",
"_enriched": [
]
},
"domain": "mydomain.myshopify.com",
"event": {
"event_name": "dl_purchase",
"id": "5651499614364",
"event_time": "2024-05-10T13:06:05-04:00",
"currencyCode": "USD",
"checkout": {
"id": "32666332692636",
"token": "c6533b07a5e065f1edb5c8761527c36f"
},
"order": {
"id": "5651499614364",
"name": "#1229",
"number": 1229,
"tags": [
]
},
"products": [
{
"quantity": 1,
"totalDiscount": 5,
"totalProductLevelDiscount": 5,
"list": "/collections/all",
"variant": {
"id": "36505717047452",
"sku": "36505717047452",
"price": 250,
"image": "https://cdn.shopify.com/s/files/1/0409/2192/3740/products/babys-room_925x_76062462-6eb1-45b5-bc0b-828257872100_64x64.jpg?v=1602859292",
"product": {
"id": "5777971019932",
"title": "Antique Drawers",
"vendor": "Company 123",
"category": "Indoor"
}
}
}
],
"values": {
"revenue": "267.05",
"subtotal": "245.00",
"product_subtotal": "250.00",
"tax": "22.05",
"shipping": "0"
},
"browser": {
"page_url": "https://mydomain.myshopify.com/wpm@d08e3199w64982d70p8ee62d9bm46e457d8/custom/web-pixel-11403420@1/sandbox/modern/checkouts/cn/Z2NwLXVzLWVhc3QxOjAxSFhIUUY5NTQwSzdaNlNNQk4wNkJISjZS",
"language": "en-US",
"page_title": "Checkout - Local - GTM Suite Testing",
"screen_resolution": "3072x1728"
},
"discountCodes": [
{
"type": "automatic"
}
],
"customer": {
"id": "4166461718684"
}
}
}
Frequently Asked Questions
Why am I seeing multiple events with the same event id?
You may notice that the event_id
is not unique for checkout events (e.g. begin checkout, add payment info, add address info). This happens in order to create a unique event concatenate the event id with the message_id
.
Why am I seeing checkout events with different revenue values?
We deduplicate checkout step events for a few days. If a user abandons and then returns a while later, we resend the checkout events, and if they’ve modified their checkout, the new checkout events will differ from the old ones.
Updated 4 months ago