Set up analytics for your e-commerce store with custom product events, revenue attribution, and conversion funnels.
E-commerce Analytics Overview
By adding the Zenovay tracking script and sending a few custom events from your store, you can analyse:
| What you track | How |
|---|---|
| Page views and sessions | Automatic, once the script is installed |
| Product views, cart actions | Custom events via zenovay('track', ...) |
| Revenue and orders | A connected payment provider (Stripe, PayPal, or Paddle) or zenovay('revenue', ...) |
| Conversion funnels | The Journeys tab, or zenovay('defineFunnel', ...) |
| Customer journey | Path-to-purchase in the Journeys tab |
There is no separate "e-commerce mode" to enable. You install the standard tracking script, then send store events with the JavaScript API.
Platform-Specific Setup
Shopify
Install the tracking script in your theme, then send store events.
- In your Shopify admin, go to Online Store → Themes
- On your active theme, click Actions → Edit code
- Open Layout/theme.liquid
- Paste the tracking script just before the closing
</head>tag:
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
To send product and order events, add a small script after it that hooks into your theme's product and checkout templates and calls the Zenovay API:
// Product view (e.g. on a product template)
zenovay('track', 'product_viewed', {
product_id: '{{ product.id }}',
product_name: '{{ product.title }}',
price: {{ product.price | divided_by: 100.0 }},
currency: '{{ shop.currency }}'
});
// Add to cart (wire to your add-to-cart handler)
zenovay('track', 'add_to_cart', {
product_id: variantId,
quantity: 1,
price: price
});
// Purchase (on the order-status / thank-you page)
zenovay('revenue', orderTotal, currency, {
order_id: orderId
});
Info
Zenovay does not have a one-click Shopify app. Installation is done by adding the script to your theme and sending events with the JavaScript API. The exact Liquid variables available depend on the template you place the script in.
WooCommerce
Add the tracking script and event hooks to your theme's functions.php (or a code-snippets plugin):
// Add Zenovay tracking script
add_action('wp_head', function() {
?>
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
<?php
});
// Track product views
add_action('woocommerce_after_single_product', function() {
global $product;
?>
<script>
zenovay('track', 'product_viewed', {
product_id: '<?php echo $product->get_id(); ?>',
product_name: '<?php echo esc_js($product->get_name()); ?>',
price: <?php echo $product->get_price(); ?>,
category: '<?php echo esc_js(wc_get_product_category_list($product->get_id())); ?>'
});
</script>
<?php
});
// Track purchases
add_action('woocommerce_thankyou', function($order_id) {
$order = wc_get_order($order_id);
?>
<script>
zenovay('revenue', <?php echo $order->get_total(); ?>, '<?php echo $order->get_currency(); ?>', {
order_id: '<?php echo $order_id; ?>'
});
</script>
<?php
});
Info
Zenovay does not publish a dedicated WooCommerce plugin. The integration above is a manual functions.php snippet using the standard tracking script and the JavaScript API.
BigCommerce
Add to Storefront → Script Manager:
<script
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
<script>
// BigCommerce product tracking
document.addEventListener('DOMContentLoaded', function() {
if (typeof BCData !== 'undefined' && BCData.product_attributes) {
zenovay('track', 'product_viewed', {
product_id: BCData.product_attributes.sku,
product_name: BCData.product_attributes.name,
price: BCData.product_attributes.price.without_tax.value
});
}
});
</script>
Custom Store
For any platform, install the script and call the API from your own code:
<script
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
// Product view
function trackProductView(product) {
zenovay('track', 'product_viewed', {
product_id: product.id,
product_name: product.name,
price: product.price,
category: product.category,
currency: 'USD'
});
}
// Add to cart
function trackAddToCart(product, quantity) {
zenovay('track', 'add_to_cart', {
product_id: product.id,
product_name: product.name,
quantity: quantity,
price: product.price,
cart_value: getCartTotal()
});
}
// Remove from cart
function trackRemoveFromCart(product) {
zenovay('track', 'remove_from_cart', {
product_id: product.id,
product_name: product.name
});
}
// Begin checkout
function trackCheckoutStart(cart) {
zenovay('track', 'checkout_started', {
cart_value: cart.total,
item_count: cart.items.length
});
}
// Purchase complete — use the revenue API so it counts toward attribution
function trackPurchase(order) {
zenovay('revenue', order.total, order.currency, {
order_id: order.id,
tax: order.tax,
shipping: order.shipping
});
}
Info
Use zenovay('revenue', amount, currency, metadata) for purchases. A plain zenovay('track', 'purchase', ...) records a custom event but does not feed the revenue and attribution reports.
Custom E-commerce Events
zenovay('track', name, properties) accepts any event name and any property object. The names below are a useful convention, not a fixed schema. Stay consistent so your funnels and reports line up.
| Suggested event | Useful properties |
|---|---|
product_viewed | product_id, product_name, price, category |
add_to_cart | product_id, quantity, price, cart_value |
remove_from_cart | product_id, quantity |
checkout_started | cart_value, item_count |
| Purchase | use zenovay('revenue', amount, currency, { order_id }) |
Product Properties
{
product_id: "SKU-123",
product_name: "Blue T-Shirt",
price: 29.99,
currency: "USD",
category: "Apparel/T-Shirts",
variant: "Large/Blue",
brand: "Acme",
quantity: 1
}
Setting Up Conversion Funnels
Funnels live on the Journeys tab of a website's dashboard.
- Open your website's dashboard (Domains → select your site)
- Open the Journeys tab, then the Funnels sub-tab
- Click Add Funnel and define the steps
Each step can be a page or a custom event. A typical purchase funnel:
| Step | Event/Page |
|---|---|
| 1 | Product Viewed |
| 2 | Add to Cart |
| 3 | Checkout Started |
| 4 | Purchase Complete |
You can also define a funnel in code, which auto-creates it the first time it is seen:
zenovay('defineFunnel', 'checkout_flow', [
{ name: 'Product', event: 'product_viewed' },
{ name: 'Cart', event: 'add_to_cart' },
{ name: 'Checkout', event: 'checkout_started' }
]);
The Goals sub-tab on the same Journeys tab lets you create individual conversion goals (for example, a completed purchase) with the Add Goal button.
Revenue Reports
Revenue and attribution reporting live on the Revenue tab of a website's dashboard.
Connect a payment provider
The most reliable way to track revenue is to connect your payment provider so Zenovay can link orders to visitor sessions.
- Open your website's dashboard
- Go to Settings → Revenue (the per-domain settings)
- Connect Stripe, PayPal, or Paddle and save
If you cannot connect a provider, send revenue from the client with zenovay('revenue', amount, currency, metadata).
What the Revenue tab shows
- Total Revenue: sum of recorded orders
- Orders: transaction count
- AOV: average order value
- Revenue by source: which traffic sources drove revenue
- Attribution: revenue split across the channels in a customer's path
Attribution supports several models (including first-touch, last-touch, and linear). Revenue reporting requires a Pro plan or higher.
Cart Analytics
Once you send add_to_cart and revenue events consistently, you can build cart-related funnels and break down where shoppers drop off between cart and purchase.
// Cart updated
zenovay('track', 'cart_updated', {
cart_value: 149.99,
item_count: 3
});
// Cart viewed
zenovay('track', 'cart_viewed', {
cart_value: 149.99,
item_count: 3
});
Testing Your Setup
Verify tracking
- Open your store
- Load the script in debug mode by adding
data-debug="true"to the script tag, or runzenovay('debug')in the browser console - Perform actions:
- View a product
- Add to cart
- Start checkout
- Complete a test purchase
- Watch the browser console for Zenovay messages
- Confirm the activity appears in your Zenovay dashboard
Test purchase
- Use a test payment if available
- Complete a full checkout
- Confirm the order appears on the Revenue tab
- Check that it is attributed to the right source
Common Issues
Revenue not showing
- Confirm the
revenueevent fires on the order-confirmation page (or your payment provider is connected) - Verify the amount is a number
- Ensure the event fires after the script has loaded
Products not tracked
- Verify the
product_viewedevent fires - Check that
product_idis consistent across events - Ensure the script is on all product pages
Cart drop-off looks wrong
- Track
checkout_startedconsistently - Send the revenue event only once per order
- Do not track refunds as new purchases
Best Practices
-
Use consistent product IDs
- The same ID across all events
- SKU or database ID works well
-
Include the key transaction data
- Amount and currency
- Order ID for de-duplication
-
Track the full journey
- From first visit to purchase
- Send the matching events at each step
-
Test thoroughly
- Verify on staging first
- Test all product types
- Confirm funnel accuracy