Segment Integration
Vendo’s Segment integration allows you to send your Shopify e-commerce data to Segment, enabling you to route customer events and profiles to hundreds of downstream destinations. This creates a unified customer data pipeline from your Shopify store.
Overview
The Segment integration provides:
- Unified Data Pipeline: Send Shopify data to 300+ destinations through Segment
- Standard E-commerce Events: Events following Segment’s e-commerce spec
- User Identity Resolution: Consistent user tracking across touchpoints
- Real-time & Batch Data: Client-side streaming and server-side batch imports
Key Benefits
- Route data to multiple tools without additional integrations
- Standardized event schema for consistent analytics
- Single source of truth for customer data
- Easy addition of new destinations without code changes
Setup Instructions
Prerequisites
- A Segment account with a workspace
- A Source created in Segment (HTTP API source recommended)
- Admin access to your Shopify store
- The Vendo app installed on your Shopify store
Step 1: Create a Segment Source
- Log in to your Segment workspace
- Go to Connections > Sources > Add Source
- Search for “HTTP API” or “Server” and select it
- Name your source (e.g., “Shopify - Vendo”)
- Copy the Write Key from the source settings
Step 2: Configure in Vendo
- Open the Vendo app in your Shopify admin
- Navigate to Integrations > Segment
- Enter your Write Key
- Save the configuration
Step 3: Select Events to Enable
Choose which events to send to Segment:
Client-Side Events:
- Page views and navigation
- Product interactions
- Cart activity
- Checkout flow
Server-Side Events:
- Order events (received, fulfilled, delivered, refunded)
- Abandoned checkouts
- User profile updates
Step 4: Configure Destinations in Segment
Once data flows to Segment, add destinations:
- Go to Connections > Destinations
- Add destinations like Google Analytics, Facebook Ads, Mixpanel, etc.
- Map Vendo events to destination-specific events
Events Tracked
Client-Side Events
Real-time events captured in the browser:
| Vendo Event | Segment Event | Description |
|---|---|---|
| Page Viewed | Page | Any page view |
| Product Viewed | Product Viewed | Product detail page |
| Collection Viewed | Product List Viewed | Collection/category page |
| Search Submitted | Products Searched | Search performed |
| Product Added To Cart | Product Added | Item added to cart |
| Product Removed From Cart | Product Removed | Item removed from cart |
| Cart Viewed | Cart Viewed | Cart page view |
| Checkout Started | Checkout Started | Begin checkout |
| Checkout Completed | Order Completed | Purchase confirmed |
Server-Side Events
Events synced from Shopify backend:
| Event Name | Segment Event | Description |
|---|---|---|
| Order Received | Order Completed | New order placed |
| Products Purchased | Product Purchased | Per-product tracking |
| Cart Abandoned | Cart Abandoned | Checkout not completed |
| Order Fulfilled | Order Fulfilled | Order shipped |
| Order Delivered | Order Delivered | Order arrived |
| Order Refunded | Order Refunded | Full refund |
| Order Partially Refunded | Order Partially Refunded | Partial refund |
| User Profile Update | Identify | Customer profile sync |
User Traits (Properties)
User profiles are synced via Segment’s identify call with these traits:
| Trait | Type | Description | Example |
|---|---|---|---|
email | String | Customer email | ”customer@email.com” |
firstName | String | First name | ”John” |
lastName | String | Last name | ”Smith” |
phone | String | Phone number | ”+14155551234” |
shopifyCustomerId | String | Shopify customer ID | ”6359703453860” |
totalSpent | Number | Lifetime spend | 1523.50 |
orderCount | Number | Total orders | 12 |
verifiedEmail | Boolean | Email verified | true |
marketingState | String | Marketing consent | ”enabled” |
taxExempt | Boolean | Tax exemption | false |
firstOrderDate | String | First purchase (ISO) | “2023-06-20T14:20:00Z” |
lastOrderDate | String | Last purchase (ISO) | “2024-01-10T09:15:00Z” |
createdAt | String | Account creation (ISO) | “2023-06-15T10:30:00Z” |
customerTags | Array | Shopify tags | [“VIP”, “repeat-buyer”] |
emailMarketingConsent | String | Marketing consent state | ”subscribed” |
User Identification
User ID Strategy
Vendo uses Shopify Customer ID as the primary identifier:
| Field | Value | Description |
|---|---|---|
userId | Shopify Customer ID | Persistent user identifier |
anonymousId | Device ID | Pre-identification tracking |
Identity Flow
- Anonymous Visitor: Tracked with Shopify device ID
- Identified User: When customer logs in or purchases, linked to Shopify Customer ID
- Cross-device: Same
userIdused across all touchpoints
Segment Identity Resolution
Configure Segment’s Profiles to:
- Merge anonymous and identified users
- Deduplicate across devices
- Build unified customer profiles
Example Payloads
Identify Call (User Profile)
{
"type": "identify",
"userId": "6359703453860",
"traits": {
"email": "customer@email.com",
"firstName": "John",
"lastName": "Smith",
"phone": "+14155551234",
"shopifyCustomerId": "6359703453860",
"totalSpent": 1523.50,
"orderCount": 12,
"verifiedEmail": true,
"marketingState": "enabled",
"taxExempt": false,
"firstOrderDate": "2023-06-20T14:20:00Z",
"lastOrderDate": "2024-01-10T09:15:00Z",
"createdAt": "2023-06-15T10:30:00Z",
"customerTags": ["VIP", "repeat-buyer", "newsletter"],
"emailMarketingConsent": "subscribed"
}
}Order Completed Event
{
"type": "track",
"userId": "6359703453860",
"event": "Order Completed",
"timestamp": "2024-01-15T10:30:00Z",
"messageId": "order_received_5363269534010",
"properties": {
"order_id": "1001",
"shopify_order_id": "5363269534010",
"email": "customer@email.com",
"currency": "USD",
"total": 162.49,
"subtotal": 149.99,
"discount": 15.00,
"tax": 12.50,
"shipping": 10.00,
"payment_method": "shopify_payments",
"products": [
{
"product_id": "7894561230",
"sku": "TSHIRT-BLK-M",
"name": "Classic T-Shirt",
"price": 29.99,
"quantity": 2,
"variant": "Black / Medium",
"url": "https://mystore.com/products/classic-tshirt",
"image_url": "https://cdn.shopify.com/tshirt.jpg"
},
{
"product_id": "7894561231",
"sku": "SHORTS-BLU-L",
"name": "Running Shorts",
"price": 45.00,
"quantity": 1,
"variant": "Blue / Large"
}
],
"source": "Vendo - Shopify App",
"version": "1.0.0"
}
}Product Purchased Event
{
"type": "track",
"userId": "6359703453860",
"event": "Product Purchased",
"timestamp": "2024-01-15T10:30:00Z",
"messageId": "product_purchased_5363269534010_7894561230",
"properties": {
"order_id": "1001",
"shopify_order_id": "5363269534010",
"product_id": "7894561230",
"sku": "TSHIRT-BLK-M",
"name": "Classic T-Shirt",
"price": 29.99,
"quantity": 2,
"variant": "Black / Medium",
"currency": "USD",
"source": "Vendo - Shopify App",
"version": "1.0.0"
}
}Cart Abandoned Event
{
"type": "track",
"userId": "6359703453860",
"event": "Cart Abandoned",
"timestamp": "2024-01-15T12:00:00Z",
"messageId": "cart_abandoned_29563359395886",
"properties": {
"checkout_id": "29563359395886",
"email": "customer@email.com",
"currency": "USD",
"total": 97.49,
"subtotal": 89.99,
"discount": 0,
"checkout_url": "https://mystore.com/checkouts/abc123/recover",
"products": [
{
"product_id": "7894561230",
"sku": "TSHIRT-BLK-M",
"name": "Classic T-Shirt",
"price": 29.99,
"quantity": 3,
"variant": "Black / Medium"
}
],
"source": "Vendo - Shopify App",
"version": "1.0.0"
}
}Order Fulfilled Event
{
"type": "track",
"userId": "6359703453860",
"event": "Order Fulfilled",
"timestamp": "2024-01-17T09:00:00Z",
"messageId": "order_fulfilled_4751610282298",
"properties": {
"order_id": "1001",
"shopify_order_id": "5363269534010",
"fulfillment_id": "4751610282298",
"email": "customer@email.com",
"fulfillment_status": "success",
"fulfillment_service": "manual",
"tracking_number": "1Z999AA10123456784",
"tracking_url": "https://ups.com/track/1Z999AA10123456784",
"fulfillment_speed_days": 2,
"source": "Vendo - Shopify App",
"version": "1.0.0"
}
}Order Delivered Event
{
"type": "track",
"userId": "6359703453860",
"event": "Order Delivered",
"timestamp": "2024-01-20T14:30:00Z",
"messageId": "order_delivered_4751610282298",
"properties": {
"order_id": "1001",
"shopify_order_id": "5363269534010",
"fulfillment_id": "4751610282298",
"email": "customer@email.com",
"fulfillment_status": "delivered",
"delivery_date": "2024-01-20T14:30:00Z",
"delivery_speed_days": 5,
"source": "Vendo - Shopify App",
"version": "1.0.0"
}
}Order Refunded Event
{
"type": "track",
"userId": "6359703453860",
"event": "Order Refunded",
"timestamp": "2024-01-25T11:00:00Z",
"messageId": "order_refunded_789456123",
"properties": {
"order_id": "1001",
"shopify_order_id": "5363269534010",
"refund_id": "789456123",
"email": "customer@email.com",
"currency": "USD",
"refund_amount": 162.49,
"total": 162.49,
"cancel_reason": "customer",
"source": "Vendo - Shopify App",
"version": "1.0.0"
}
}Client-Side Event Payloads
Client-side events are tracked via the Shopify Web Pixel and sent to Segment’s HTTP Tracking API. Events follow Segment’s E-commerce Spec.
Page Viewed Event (Client-Side)
{
"type": "track",
"event": "Page Viewed",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:30:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer-sale"
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/collections/summer",
"referrer": "https://google.com",
"title": "Summer Collection – My Store"
},
"userAgent": "Chrome on Mac OS X",
"campaign": {
"source": "google",
"medium": "cpc",
"name": "summer-sale"
}
}
}Product Viewed Event (Client-Side)
{
"type": "track",
"event": "Product Viewed",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:32:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"variant": "Black / Medium",
"price": 29.99,
"currency": "USD",
"sku": "TSHIRT-BLK-M",
"utm_source": "google",
"utm_medium": "cpc"
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/products/classic-tshirt",
"referrer": "https://mystore.com/collections/all",
"title": "Classic T-Shirt – My Store"
},
"campaign": {
"source": "google",
"medium": "cpc"
}
}
}Product Added Event (Client-Side)
{
"type": "track",
"event": "Product Added",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:35:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"currency": "USD",
"value": 59.98,
"products": [
{
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"variant": "Black / Medium",
"price": 29.99,
"quantity": 2,
"position": 1,
"currency": "USD",
"sku": "TSHIRT-BLK-M",
"url": "https://mystore.com/products/classic-tshirt"
}
],
"utm_source": "google",
"utm_medium": "cpc"
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/products/classic-tshirt",
"title": "Classic T-Shirt – My Store"
}
}
}Cart Viewed Event (Client-Side)
{
"type": "track",
"event": "Cart Viewed",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:38:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"currency": "USD",
"value": 149.97,
"products": [
{
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"variant": "Black / Medium",
"price": 29.99,
"quantity": 2,
"currency": "USD",
"sku": "TSHIRT-BLK-M"
},
{
"product_id": "gid://shopify/Product/7894561231",
"name": "Running Shorts",
"brand": "My Brand",
"category": "Apparel",
"variant": "Blue / Large",
"price": 45.00,
"quantity": 1,
"currency": "USD",
"sku": "SHORTS-BLU-L"
}
]
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/cart",
"title": "Your Cart – My Store"
}
}
}Checkout Started Event (Client-Side)
{
"type": "track",
"event": "Checkout Started",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:40:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"checkout_id": "abc123def456",
"order_id": "gid://shopify/Order/5363269534010",
"currency": "USD",
"value": 162.49,
"revenue": 149.97,
"tax": 12.52,
"shipping": 0.00,
"coupon": "SUMMER20",
"products": [
{
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"variant": "Black / Medium",
"price": 29.99,
"quantity": 2,
"currency": "USD",
"sku": "TSHIRT-BLK-M"
}
],
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer-sale"
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/checkouts/abc123",
"title": "Checkout – My Store"
},
"campaign": {
"source": "google",
"medium": "cpc",
"name": "summer-sale"
}
}
}Order Completed Event (Client-Side)
{
"type": "track",
"event": "Order Completed",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:45:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"checkout_id": "abc123def456",
"order_id": "gid://shopify/Order/5363269534010",
"currency": "USD",
"total": 162.49,
"revenue": 149.97,
"tax": 12.52,
"shipping": 10.00,
"coupon": "SUMMER20",
"products": [
{
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"variant": "Black / Medium",
"price": 29.99,
"quantity": 2,
"currency": "USD",
"sku": "TSHIRT-BLK-M"
}
],
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer-sale"
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/checkouts/abc123/thank_you",
"title": "Thank you – My Store"
},
"campaign": {
"source": "google",
"medium": "cpc",
"name": "summer-sale"
}
}
}Product List Viewed Event (Client-Side)
Collection page views are mapped to Segment’s “Product List Viewed”:
{
"type": "track",
"event": "Product List Viewed",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:28:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"list_id": "gid://shopify/Collection/123456789",
"category": "Summer Collection",
"products": [
{
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"variant": "Black / Medium",
"price": 29.99,
"position": 1,
"currency": "USD",
"sku": "TSHIRT-BLK-M"
},
{
"product_id": "gid://shopify/Product/7894561231",
"name": "Running Shorts",
"brand": "My Brand",
"category": "Apparel",
"variant": "Blue / Large",
"price": 45.00,
"position": 2,
"currency": "USD",
"sku": "SHORTS-BLU-L"
}
]
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/collections/summer",
"title": "Summer Collection – My Store"
}
}
}Products Searched Event (Client-Side)
{
"type": "track",
"event": "Products Searched",
"userId": "6359703453860",
"anonymousId": "shop_client_abc123",
"timestamp": "2024-01-15T10:25:00.000Z",
"properties": {
"source": "Vendo - Shopify App",
"vendo_tracking_version": "1.1.4",
"query": "t-shirt",
"products": [
{
"product_id": "gid://shopify/Product/7894561230",
"name": "Classic T-Shirt",
"brand": "My Brand",
"category": "Apparel",
"price": 29.99,
"position": 1,
"currency": "USD"
}
]
},
"context": {
"library": {
"name": "Vendo Shopify",
"version": "1.0.0"
},
"page": {
"url": "https://mystore.com/search?q=t-shirt",
"title": "Search Results – My Store"
}
}
}Identify Call (Client-Side - on Checkout Completed)
When a customer completes checkout, an identify call is also sent:
{
"type": "identify",
"userId": "6359703453860",
"timestamp": "2024-01-15T10:45:00.000Z",
"traits": {
"email": "customer@email.com",
"firstName": "John",
"lastName": "Smith",
"phone": "+14155551234",
"shopifyCustomerId": "6359703453860",
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer-sale",
"gclid": "CjwKCAjw...",
"fbclid": "IwAR3xyz...",
"initial_utm_source": "facebook",
"initial_utm_medium": "social",
"first_seen": "2024-01-01T08:00:00.000Z"
}
}Alias Call (Client-Side)
When linking anonymous to identified user:
{
"type": "alias",
"previousId": "shop_client_abc123",
"userId": "6359703453860",
"timestamp": "2024-01-15T10:45:00.000Z"
}What to Expect in Segment
After Setup
- Events in Debugger: See real-time events in Segment’s Source Debugger
- Schema Auto-populated: Event and property schemas generated automatically
- User Profiles: If using Segment Profiles, unified customer views
Source Debugger
View incoming events:
- Go to your Source in Segment
- Click Debugger
- See real-time event stream
Schema
Segment auto-generates schemas from incoming data:
- Event names and descriptions
- Property types and examples
- Trait definitions
Event Volume
Monitor your event volume to manage Segment billing:
- Monthly Tracked Users (MTU): Unique userId values
- API Calls: Total events sent
Downstream Destinations
Recommended Destinations
Route Vendo data to these popular destinations:
| Category | Destinations |
|---|---|
| Analytics | Google Analytics 4, Amplitude, Heap |
| Marketing | Facebook Ads, Google Ads, TikTok Ads |
| Klaviyo, Mailchimp, Customer.io | |
| CRM | HubSpot, Salesforce, Intercom |
| Data Warehouse | BigQuery, Snowflake, Redshift |
| Customer Support | Zendesk, Freshdesk |
Event Mapping
Some destinations require event mapping. Vendo events map to common specs:
| Vendo Event | Segment Spec | Destination Compatibility |
|---|---|---|
| Order Completed | Order Completed | Universal |
| Product Purchased | Product Purchased | Universal |
| Cart Abandoned | Custom Event | Requires mapping |
| Order Fulfilled | Custom Event | Requires mapping |
Setting Up Destinations
- Go to Connections > Destinations
- Click Add Destination
- Select your destination
- Configure authentication
- Map events (if required)
- Enable the destination
Data Sync Details
Sync Frequency
| Data Type | Sync Method | Frequency |
|---|---|---|
| Client Events | Real-time streaming | Immediate |
| Server Events | Batch import | Every 1-4 hours |
| User Profiles | Batch import | Every 4-6 hours |
Historical Backfill
Vendo backfills historical data:
- Orders: All historical orders
- Customers: All customer profiles
- Abandoned Carts: Last 30 days
Deduplication
Events use messageId for deduplication:
- Format:
{event_type}_{unique_id} - Example:
order_received_5363269534010
Troubleshooting
Events Not Appearing in Segment
- Check Write Key: Verify the write key is correct
- View Debugger: Check Segment’s Source Debugger for errors
- Check Event Status: Ensure events are enabled in Vendo
Events Not Reaching Destinations
- Check Destination Status: Ensure destination is enabled
- Review Mappings: Verify event mappings are configured
- Check Filters: Ensure no filters are blocking events
User Profiles Not Merging
- Verify userId: Ensure consistent userId across events
- Check Profiles Config: Review Segment Profiles settings
- Review Identity Rules: Check identity resolution configuration
Best Practices
1. Use Protocols
Define your tracking plan in Segment Protocols to:
- Validate incoming events
- Ensure data quality
- Document your schema
2. Filter Sensitive Data
Configure Segment to filter:
- PII from certain destinations
- Test orders (where test = true)
- Internal traffic
3. Monitor Volume
Track your event volume:
- Set up usage alerts
- Archive historical data if needed
- Optimize destination configs
Support
For assistance with your Segment integration:
- Email: support@vendodata.com
- Documentation: https://docs.vendodata.com
- Segment Help: https://segment.com/docs