What Gets Synced
Orders:- Order ID, order number, created date
- Total price, currency, line items
- Customer email, customer ID
- Discount codes, tags
- Financial status, fulfillment status
- Refunds and cancellations
- Product title, SKU, vendor, type
- Cost per item (COGS)
- Price, compare at price
- Inventory quantity
- Email, name, phone
- Customer ID, created date
- Total orders, lifetime value
order_paid- Order payment receivedorder_fulfilled- Order shippedorder_cancelled- Order cancelledcheckout_completed- Checkout completedcheckout_abandoned- Cart abandonedcustomer_created- New customer registered
Setup
1. Connect Your Shopify Store
Via Shopify App Store (Recommended):- Install DATALYR app from Shopify App Store
- Click “Add app” to authorize DATALYR
- Grant read permissions for orders, products, customers
- DATALYR automatically configures tracking and webhooks
- Navigate to Settings → Integrations
- Click “Connect” next to Shopify
- Enter your Shopify store URL (e.g.,
yourstore.myshopify.com) - Authorize DATALYR in Shopify admin
- Grant read permissions
2. Install Tracking Script
Add DATALYR tracking to your Shopify store: Option A: Via App (Automatic) If you installed via Shopify App Store, tracking is automatically added via Web Pixels API. Option B: Manual Installation If you connected via DATALYR dashboard:- Go to Shopify Admin → Online Store → Themes
- Click “Actions” → “Edit code”
- Open
theme.liquid - Add DATALYR script before
</head>:
- Save changes
3. Configure Webhooks
Webhooks enable real-time order sync. Via App (Automatic): Webhooks are automatically configured when you install the DATALYR Shopify app. Manual Configuration:- Go to Shopify Admin → Settings → Notifications
- Scroll to “Webhooks” section
- Create these webhooks pointing to your DATALYR webhook URL:
- Event: Order payment →
https://app.datalyr.com/api/shopify/webhook - Event: Order fulfillment →
https://app.datalyr.com/api/shopify/webhook - Event: Order cancelled →
https://app.datalyr.com/api/shopify/webhook
- Event: Checkout creation →
https://app.datalyr.com/api/shopify/webhook
4. Verify Integration
Test Order:- Create a test order in your Shopify store
- Go to DATALYR Dashboard → Event Stream
- Verify
order_paidevent appears - Check that customer email matches
- Click on the order event in Event Stream
- Verify attribution data (source, medium, campaign)
- Confirm customer journey is linked
Order Sync
How It Works
Real-Time Sync (Webhooks):Order Attribution
DATALYR attributes orders to marketing sources using email matching: Step 1: User Clicks AdOrder Events
order_paid: Fired when order payment is received.Profit Tracking
DATALYR calculates profit by syncing product costs from Shopify.Setup Product Costs
In Shopify Admin:- Go to Products → Select a product
- Scroll to “Variants” section
- Enter “Cost per item” for each variant
- Save product
- Export products as CSV
- Add “Variant Cost” column
- Fill in costs for each variant
- Import CSV back to Shopify
How Profit is Calculated
Profit Metrics in Dashboard
DATALYR Dashboard shows:- Total revenue
- Total cost (COGS)
- Total profit
- Profit margin (%)
- ROAS (return on ad spend)
- Profit per order
- Profit by source/medium/campaign
- Date range
- Source (Facebook, Google, TikTok, etc.)
- Campaign
- Product
- Customer
Customer Journey
DATALYR links Shopify customers to their complete journey from first touch to purchase.Journey Example
Day 1: First Visit (Anonymous)- First touch: Facebook ad (Day 1)
- Middle touch: Google organic (Day 3)
- Last touch: Direct checkout (Day 3)
- Conversion attributed to Facebook (first-touch) or Direct (last-touch)
Customer Lifetime Value
DATALYR tracks customer LTV:- Total orders per customer
- Total revenue per customer
- Average order value
- Repeat purchase rate
- Time between orders
- Acquisition source
- First order date
- Total spent
- Order count
Advanced Features
Abandoned Cart Recovery
Track abandoned checkouts for retargeting: What Gets Tracked:- Checkout ID, token
- Items in cart
- Total value
- Customer email (if provided)
- Abandonment timestamp
- Send abandoned cart emails
- Create retargeting audiences
- Track recovery rate
- Measure cart abandonment by source
Multi-Currency Support
DATALYR handles multiple currencies:- Orders synced in original currency
- Dashboard shows currency breakdown
- Conversions sent to ad platforms in original currency
- Optional currency conversion for reporting
Discount Code Tracking
Track discount code performance:- Which codes are used
- Revenue per discount code
- Discount attribution to campaigns
- ROI of discount campaigns
Tags and Segments
Use Shopify tags for segmentation:- VIP customers
- Wholesale orders
- Subscription orders
- Gift purchases
Troubleshooting
Orders Not Appearing in DATALYR
Check:- Integration is connected and active (Settings → Integrations)
- Webhooks are configured correctly in Shopify Admin
- Webhook URL is:
https://app.datalyr.com/api/shopify/webhook - Order is within sync window (last 30 days)
- Create a test order in Shopify
- Check Event Stream within 1 minute
- If not appearing, check webhook delivery in Shopify Admin
Orders Not Attributed
Verify:- Customer email in order matches visitor email
- Visitor was tracked before purchase (check Event Stream)
- Attribution window not exceeded (default 30 days)
- Tracking script is installed on site
- Go to Event Stream
- Search for customer email
- Verify events exist before order
- Confirm attribution data present (utm_source, fbclid, etc.)
Profit Showing as Zero
Fix:- Add product costs in Shopify Admin (Products → Cost per item)
- Wait for next sync (up to 15 minutes)
- Refresh DATALYR dashboard
- Verify costs appear in order details
Duplicate Orders
Causes:- Webhook and API sync both creating orders
- Shopify sending duplicate webhooks
- DATALYR automatically deduplicates by order ID
- If seeing duplicates, contact support with order ID
Data Privacy
Customer Data:- Customer emails are hashed before sending to ad platforms
- SHA-256 hashing compliant with GDPR
- No plaintext PII sent to Meta/Google/TikTok
- Orders retained indefinitely for reporting
- Customer data retained for attribution
- Users can request data deletion
- Opt-out respected across all platforms
- No data synced for opted-out users
- Data deletion on request
Next Steps
Stripe Integration
Connect Stripe for subscription tracking
Meta Ads Integration
Send conversions to Facebook and Instagram
Customer Journeys
View complete customer paths
Profit Tracking
Analyze profit and ROAS