Integrate Zenovay with your Shopify store for complete e-commerce analytics, revenue tracking, and customer journey insights.
Installation
Theme Installation
- Go to Online Store -> Themes
- Click "Actions" -> "Edit code"
- Find
theme.liquid - Add before
</head>:
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
Google Tag Manager
If using GTM:
- Create a new Custom HTML tag
- Add the Zenovay script tag
- Trigger on All Pages
Automatic E-commerce Tracking
With Shopify App
Automatically tracked:
- Product views
- Add to cart
- Remove from cart
- Checkout initiated
- Payment info added
- Purchase completed
- Revenue attributed
Events Tracked
| Event | When |
|---|---|
| view_product | Product page viewed |
| add_to_cart | Item added to cart |
| remove_from_cart | Item removed |
| begin_checkout | Checkout started |
| add_payment_info | Payment entered |
| purchase | Order completed |
Manual Revenue Tracking
Order Status Page
Add to Settings → Checkout → Order status page:
{% if first_time_accessed %}
<script>
if (window.zenovay) {
zenovay('revenue', {{ total_price | money_without_currency | remove: ',' }}, '{{ currency }}', {
order_id: '{{ order.name }}',
shipping: {{ shipping_price | money_without_currency | remove: ',' }},
tax: {{ tax_price | money_without_currency | remove: ',' }},
items: [
{% for item in line_items %}
{
id: '{{ item.sku | default: item.product_id }}',
name: '{{ item.title | escape }}',
price: {{ item.final_price | money_without_currency | remove: ',' }},
quantity: {{ item.quantity }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
});
}
</script>
{% endif %}
Product Page Tracking
Add to product template:
<script>
document.addEventListener('DOMContentLoaded', function() {
if (window.zenovay) {
zenovay('track', 'view_product', {
product_id: '{{ product.id }}',
product_name: '{{ product.title | escape }}',
price: {{ product.price | money_without_currency | remove: ',' }},
category: '{{ product.type | escape }}',
variant: '{{ product.selected_or_first_available_variant.title | escape }}'
});
}
});
</script>
Add to Cart Tracking
For Ajax carts, add to theme JavaScript:
// Listen for cart updates
document.addEventListener('cart:added', function(event) {
if (window.zenovay && event.detail) {
const item = event.detail;
zenovay('track', 'add_to_cart', {
product_id: item.product_id,
variant_id: item.variant_id,
product_name: item.product_title,
price: item.price / 100,
quantity: item.quantity
});
}
});
Customer Identification
After Checkout
{% if customer %}
<script>
if (window.zenovay) {
zenovay('identify', '{{ customer.id }}', {
email: '{{ customer.email }}',
name: '{{ customer.name | escape }}',
orders_count: {{ customer.orders_count }},
total_spent: {{ customer.total_spent | money_without_currency | remove: ',' }}
});
}
</script>
{% endif %}
Account Pages
Add to customer templates:
{% if customer %}
<script>
if (window.zenovay) {
zenovay('identify', '{{ customer.id }}', {
email: '{{ customer.email }}',
name: '{{ customer.name | escape }}'
});
}
</script>
{% endif %}
Shopify Plus Features
Checkout Extensibility
For Shopify Plus checkout:
// checkout.js
import { extension } from '@shopify/checkout-ui-extensions';
export default extension('Checkout::Dynamic::Render', (root, api) => {
// Track checkout events
if (window.zenovay) {
zenovay('track', 'checkout_step', {
step: api.step,
total: api.cost.totalAmount.amount
});
}
});
Scripts Editor
For Plus stores, use Scripts:
# Track with custom attributes
Output.cart.attributes["zenovay_session"] = Input.cart.token
Goal Setup
Purchase Goal
Automatically tracked with app. Manual setup:
- Go to Zenovay → Goals
- Create goal "Purchase"
- Type: Event
- Event name:
purchase
Add to Cart Goal
- Create goal "Add to Cart"
- Type: Event
- Event name:
add_to_cart
Newsletter Signup
Track Shopify newsletter forms:
<script>
document.querySelector('[data-newsletter-form]')?.addEventListener('submit', function() {
if (window.zenovay) {
zenovay('goal', 'newsletter_signup');
}
});
</script>
Conversion Funnel
Standard E-commerce Funnel
Product View 100%
↓
Add to Cart 15%
↓
Checkout 8%
↓
Purchase 4%
Setting Up Funnel
- Go to Funnels → Create
- Add steps:
- view_product
- add_to_cart
- begin_checkout
- purchase
- Save and analyze
Multi-Currency Support
Track in Customer's Currency
<script>
if (window.zenovay) {
zenovay('revenue', {{ total_price | money_without_currency | remove: ',' }}, '{{ cart.currency.iso_code }}');
}
</script>
Reporting Currency
In Zenovay settings, set:
- Primary currency for reports
- Automatic conversion applies
Headless Shopify
Hydrogen/Oxygen
// In your checkout success component
import { useEffect } from 'react';
export function OrderConfirmation({ order }) {
useEffect(() => {
if (window.zenovay) {
window.zenovay('revenue', parseFloat(order.totalPrice.amount), order.totalPrice.currencyCode, {
order_id: order.id,
items: order.lineItems.map(item => ({
id: item.variant.sku,
name: item.title,
price: parseFloat(item.variant.price.amount),
quantity: item.quantity
}))
});
}
}, [order]);
return <div>Thank you!</div>;
}
Storefront API
When using Storefront API:
// After successful checkout
const response = await fetch('/api/checkout', {
method: 'POST',
body: JSON.stringify(checkoutData)
});
const order = await response.json();
// Track in Zenovay
zenovay('revenue', order.total, order.currency, {
order_id: order.id
});
App Settings
Configuration Options
| Setting | Description |
|---|---|
| Website ID | Your Zenovay tracking ID |
| Track products | Enable product view events |
| Track cart | Cart add/remove events |
| Track checkout | Checkout funnel events |
| Track orders | Purchase completion |
| Exclude staff | Don't track staff visits |
Privacy Settings
| Setting | Description |
|---|---|
| IP anonymization | Mask visitor IPs |
| Cookie consent | Wait for consent |
| DNT respect | Honor Do Not Track |
Troubleshooting
Events Not Tracking
Check:
- App installed and configured
- Website ID correct
- Not logged in as staff (if excluded)
- Browser console for errors
Revenue Not Matching
Verify:
- Currency settings
- Tax/shipping inclusion
- Refund handling
- Test order tracking
Checkout Not Tracking
For checkouts:
- Script must be on checkout
- Shopify Plus may need custom setup
- Test with real checkout
Theme Compatibility
Works with:
- Dawn
- Debut
- Brooklyn
- All 2.0 themes
- Most custom themes
Testing
Test Mode
Enable test mode:
- Add
?zenovay_debug=trueto URL - View console for events
- Verify data structure
Test Order
- Enable test mode
- Complete checkout
- Verify in Zenovay real-time
- Check revenue attribution