The following code snippets are all real examples of data our Segment connection sends.
/* Product Viewed - Client-side event */
analytics.track('Product Viewed', {
brand: 'Brand',
category: 'EnhancedEcommerce',
currency: 'GBP',
name: 'Product,
position: 1,
price: 9.99,
product_id: 'SKU',
sku: 'SKU',
url: 'URL',
variant: 'product variant',
shopify_product_id: '12345',
shopify_variant_id: '891011',
compare_at_price: 12.99
});
/* Product Added - Server-side event */
analytics.track({
anonymousId: 'anonId',
event: 'Product Added',
properties: {
category: 'EnhancedEcommerce',
currency: 'GBP',
products: [
{
brand: 'Brand',
category: 'Category',
name: 'Product name',
price: '9.99,
product_id: 'SKU-2',
quantity: 1,
variant: 'product variant'
}
],
sent_from: 'Littledata app'
}
});
/* Checkout Step Viewed - Server-side event */
analytics.track({
anonymousId: 'anonId',
event: 'Checkout Step Viewed',
properties: {
cart_id: 'd66020a4be5541dedd1e22478fa5891f',
category: 'EnhancedEcommerce',
checkout_id: '106ef943db455222d1b6e32e08dcbaee',
coupon: '',
currency: 'GBP',
products: [
{
brand: 'Brand',
category: 'Category',
name: 'Product name',
price: '9.99',
product_id: 'SKU-2',
quantity: 1,
variant: 'product variant'
}
],
sent_from: 'Littledata app',
step: 1
}
});
/* Order Completed - Server-side event */
analytics.track({
anonymousId: 'anonId',
event: 'Order Completed',
properties: {
affiliation: 'Shopify',
cart_id: 'd66020a4be5541dedd1e22478fa5891f',
category: 'EnhancedEcommerce',
checkout_id: '106ef943db455222d1b6e32e08dcbaee',
coupon: '',
currency: 'GBP',
discount: 0,
order_id: 1000,
products: [
{
brand: 'Brand',
category: 'Categoory',
name: 'product name',
price: '9.99',
product_id: 'SKU-2',
quantity: 1,
variant: 'product variant'
}
],
revenue: 9.99,
sent_from: 'Littledata app',
shipping: 0,
tax: 0,
total: 9.99,
userId: '123'
}
});
/* Customer Created - Server-side event */
analytics.track({
userId: '123',
event: 'Customer created',
properties: {
address: {
city: 'City',
country: 'Country',
postalCode: 'postalCode',
state: 'State',
street: 'Streed'
},
createdAt: new Date('2020-01-14T10:17:05.000Z'),
customerLifetimeValue: 0,
description: null,
email: 'email@email.com',
firstName: 'firstName',
id: id,
lastName: 'lastName',
phone: 'phone',
purchaseCount: 0,
tags: ''
}
});