Shopify Integration
Track your Shopify store performance with privacy-focused analytics. Get complete visibility into customer journeys, product performance, and revenue attribution.
Zenovay offers two integration methods: the Shopify App (recommended for most users) or manual theme installation (for advanced customization).
Quick Start
Choose your preferred installation method:
| Method | Best For | Setup Time |
|---|---|---|
| Shopify App | Most stores, automatic updates | 2 minutes |
| Theme Installation | Custom tracking, full control | 5 minutes |
| Shopify Plus | Advanced checkout tracking | 10 minutes |
Method 1: Shopify App (Recommended)
Installation
- Visit the Zenovay app in the Shopify App Store
- Click Add app
- Review permissions and click Install
- Connect your Zenovay account or create a new one
- Complete the setup wizard
What Gets Installed
The app automatically:
- Adds the tracking script to your theme
- Configures eCommerce event tracking
- Sets up checkout and thank you page tracking
- Enables customer journey attribution
Updating
The Shopify app automatically updates when new features are released. No action required.
Method 2: Manual Theme Installation
Step 1: Add Tracking Script
- Go to Online Store → Themes
- Click Actions → Edit code
- Open
theme.liquid(under Layout) - Add before
</head>:
<!-- Zenovay Analytics -->
<script defer data-tracking-code="YOUR_TRACKING_CODE" src="https://api.zenovay.com/z.js"></script>
Step 2: Add eCommerce Tracking
Create a new snippet file snippets/zenovay-ecommerce.liquid:
{% comment %}
Zenovay eCommerce Tracking
Include this in theme.liquid before </body>
{% endcomment %}
<script>
window.zenovayEcommerce = window.zenovayEcommerce || {};
{% if template contains 'product' %}
// Track product views
window.zenovayEcommerce.product = {
id: '{{ product.id }}',
name: '{{ product.title | escape }}',
price: {{ product.price | money_without_currency | remove: ',' }},
currency: '{{ shop.currency }}',
category: '{{ product.type | escape }}',
vendor: '{{ product.vendor | escape }}'
};
document.addEventListener('DOMContentLoaded', function() {
if (window.zenovay) {
window.zenovay('track', 'product_viewed', window.zenovayEcommerce.product);
}
});
{% endif %}
{% if template contains 'collection' %}
// Track collection views
window.zenovayEcommerce.collection = {
id: '{{ collection.id }}',
name: '{{ collection.title | escape }}',
products_count: {{ collection.products_count }}
};
document.addEventListener('DOMContentLoaded', function() {
if (window.zenovay) {
window.zenovay('track', 'collection_viewed', window.zenovayEcommerce.collection);
}
});
{% endif %}
</script>
Include the snippet in theme.liquid before </body>:
{% render 'zenovay-ecommerce' %}
Step 3: Track Add to Cart
Add to your theme's add-to-cart button handler or create snippets/zenovay-cart.liquid:
<script>
document.addEventListener('DOMContentLoaded', function() {
// Listen for add to cart events
document.querySelectorAll('[data-add-to-cart], .add-to-cart, form[action*="/cart/add"]').forEach(function(form) {
form.addEventListener('submit', function(e) {
var product = window.zenovayEcommerce?.product;
if (product && window.zenovay) {
window.zenovay('track', 'add_to_cart', {
product_id: product.id,
product_name: product.name,
price: product.price,
currency: '{{ shop.currency }}',
quantity: 1
});
}
});
});
});
</script>
Method 3: Shopify Plus (Checkout Extensibility)
Shopify Plus merchants can track checkout events using checkout extensibility.
Thank You Page Tracking
Add to Settings → Checkout → Order status page → Additional scripts:
{% if first_time_accessed %}
<script defer data-tracking-code="YOUR_TRACKING_CODE" src="https://api.zenovay.com/z.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
if (window.zenovay) {
window.zenovay('track', 'purchase', {
transaction_id: '{{ order.name }}',
order_id: '{{ order.id }}',
revenue: {{ checkout.total_price | money_without_currency | remove: ',' }},
currency: '{{ checkout.currency }}',
tax: {{ checkout.tax_price | money_without_currency | remove: ',' }},
shipping: {{ checkout.shipping_price | money_without_currency | remove: ',' }},
items: [
{% for line_item in checkout.line_items %}
{
product_id: '{{ line_item.product_id }}',
name: '{{ line_item.title | escape }}',
price: {{ line_item.final_price | money_without_currency | remove: ',' }},
quantity: {{ line_item.quantity }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
});
// Identify customer (optional)
{% if checkout.email %}
window.zenovay('identify', {
email: '{{ checkout.email }}'
});
{% endif %}
}
});
</script>
{% endif %}
Checkout Extensibility (App Block)
For full checkout tracking on Shopify Plus:
- Install the Zenovay Shopify app
- Go to Settings → Checkout → Customize
- Add the Zenovay Tracking app block
- Position it in the checkout flow
Automatic Events
Zenovay automatically tracks these Shopify events:
| Event | Description | Data Captured |
|---|---|---|
page_view | Every page visited | URL, referrer, timestamp |
product_viewed | Product page visits | Product ID, name, price, category |
collection_viewed | Collection page visits | Collection ID, name |
add_to_cart | Items added to cart | Product, quantity, value |
checkout_started | Checkout initiated | Cart value, item count |
purchase | Order completed | Transaction ID, revenue, items |
Custom Event Tracking
Track additional events specific to your store:
Wishlist Actions
// When user adds to wishlist
window.zenovay('track', 'wishlist_add', {
product_id: '12345',
product_name: 'Product Name',
price: 29.99
});
// When user removes from wishlist
window.zenovay('track', 'wishlist_remove', {
product_id: '12345'
});
Product Interactions
// Image gallery navigation
window.zenovay('track', 'product_image_viewed', {
product_id: '12345',
image_index: 2
});
// Size guide opened
window.zenovay('track', 'size_guide_opened', {
product_id: '12345'
});
// Reviews section viewed
window.zenovay('track', 'reviews_viewed', {
product_id: '12345',
reviews_count: 47
});
Promotional Events
// Coupon applied
window.zenovay('track', 'coupon_applied', {
coupon_code: 'SAVE20',
discount_value: 20.00
});
// Newsletter signup
window.zenovay('track', 'newsletter_signup', {
source: 'popup'
});
Revenue Attribution
Connect purchases to their sources:
UTM Tracking
Zenovay automatically captures UTM parameters:
https://yourstore.com/products/item?utm_source=instagram&utm_medium=paid&utm_campaign=summer_sale
View revenue by:
- Source: Google, Instagram, Email, etc.
- Medium: organic, paid, referral, email
- Campaign: Specific marketing campaigns
- Content: A/B test variations
First-Party Tracking
For stores using ad blockers bypass, use first-party tracking:
// In theme.liquid
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
data-api-url="/api/_z/"
src="/api/_z/script.js">
</script>
Customer Journey Analysis
Track the complete path from first visit to purchase:
Session Linking
Zenovay automatically links sessions when customers:
- Create an account
- Complete checkout
- Subscribe to newsletter
Customer Identification
Identify customers explicitly for cross-device tracking:
{% if customer %}
<script>
document.addEventListener('DOMContentLoaded', function() {
if (window.zenovay) {
window.zenovay('identify', {
email: '{{ customer.email }}',
userId: '{{ customer.id }}',
name: '{{ customer.name | escape }}'
});
}
});
</script>
{% endif %}
Dashboard Metrics
Key metrics available in your Zenovay dashboard:
eCommerce Metrics
| Metric | Description |
|---|---|
| Revenue | Total tracked revenue |
| Transactions | Number of purchases |
| Average Order Value | Revenue ÷ Transactions |
| Conversion Rate | Purchases ÷ Sessions |
| Cart Abandonment Rate | Carts not converted |
Funnel Analysis
Visualize your conversion funnel:
- Store visit → Product view
- Product view → Add to cart
- Add to cart → Checkout started
- Checkout started → Purchase
Identify where customers drop off and optimize those pages.
Troubleshooting
Script Not Loading
Symptoms: No data in Zenovay dashboard
Solutions:
- Check browser console for errors
- Verify tracking code is correct
- Ensure script is in
theme.liquid, not a template - Check if ad blockers are blocking (use first-party tracking)
Duplicate Page Views
Symptoms: Page views count is 2x expected
Solutions:
- Ensure tracking script is only added once
- Check for both app and manual installation
- Remove tracking from individual templates if in
theme.liquid
Missing Purchase Events
Symptoms: Transactions not tracked
Solutions:
- For Shopify Plus: Add script to checkout additional scripts
- Verify
first_time_accessedcondition is used - Check that order status page script is executing
Events Not Matching Revenue
Symptoms: Tracked revenue doesn't match Shopify
Solutions:
- Ensure currency conversion is correct
- Check for missing transactions (script timing)
- Verify price extraction removes currency symbols
Privacy Configuration
Cookie Consent Integration
If using a consent management platform:
// Load tracking script after consent
document.addEventListener('cookieconsent:accepted', function() {
var s = document.createElement('script');
s.defer = true;
s.src = 'https://api.zenovay.com/z.js';
s.dataset.trackingCode = 'YOUR_TRACKING_CODE';
document.head.appendChild(s);
});
GDPR Compliance
Zenovay is privacy-first:
- No personal data collected without consent
- No cross-site tracking
- Data stored in EU (configurable)
- Respects Do Not Track headers
See GDPR Compliance Guide for detailed configuration.
Performance
Script Loading
The Zenovay script is:
- Deferred: Doesn't block page rendering
- Lightweight: < 5KB gzipped
- Cached: CDN-delivered globally
Impact on Core Web Vitals
| Metric | Impact |
|---|---|
| LCP | No impact (deferred loading) |
| FID | No impact (async execution) |
| CLS | No impact (no DOM changes) |
Best Practices
- Use the Shopify app when possible for automatic updates
- Enable first-party tracking for better data accuracy
- Track custom events for important interactions
- Set up conversion goals for key actions
- Review funnels weekly to identify optimization opportunities
Related Resources
- eCommerce Tracking Guide
- Conversion Funnels
- Revenue Attribution
- First-Party Tracking
- Troubleshooting
Need help? Contact [email protected] or visit our Help Center.