Set up comprehensive analytics for your e-commerce store with product tracking, revenue attribution, and conversion funnels.
E-commerce Analytics Overview
Zenovay provides specialized features for e-commerce:
| Feature | What it tracks |
|---|---|
| Revenue Tracking | Orders, revenue, AOV |
| Product Analytics | Views, adds to cart, purchases |
| Conversion Funnels | Cart → Checkout → Purchase |
| Customer Journey | Path to purchase |
| Cart Abandonment | Drop-offs and recovery |
Platform-Specific Setup
Shopify
Option 1: One-click integration
- Go to Settings → Integrations
- Click Shopify
- Enter your store URL
- Authorize the app
- Tracking auto-configured
Option 2: Manual installation
- Go to your Shopify Admin
- Settings → Customer events
- Click "Add custom pixel"
- Add the Zenovay script:
// Zenovay E-commerce Pixel for Shopify
(function() {
var script = document.createElement('script');
script.src = 'https://api.zenovay.com/z.js';
script.dataset.trackingCode = 'YOUR_TRACKING_CODE';
document.head.appendChild(script);
})();
// Track page views
analytics.subscribe('page_viewed', (event) => {
if (window.zenovay) {
zenovay('page');
}
});
// Track product views
analytics.subscribe('product_viewed', (event) => {
if (window.zenovay) {
zenovay('track','product_viewed', {
product_id: event.data.productVariant.product.id,
product_name: event.data.productVariant.product.title,
price: event.data.productVariant.price.amount,
currency: event.data.productVariant.price.currencyCode
});
}
});
// Track add to cart
analytics.subscribe('product_added_to_cart', (event) => {
if (window.zenovay) {
zenovay('track','add_to_cart', {
product_id: event.data.cartLine.merchandise.product.id,
product_name: event.data.cartLine.merchandise.product.title,
quantity: event.data.cartLine.quantity,
price: event.data.cartLine.merchandise.price.amount
});
}
});
// Track purchases
analytics.subscribe('checkout_completed', (event) => {
if (window.zenovay) {
zenovay('track','purchase', {
order_id: event.data.checkout.order.id,
revenue: event.data.checkout.totalPrice.amount,
currency: event.data.checkout.currencyCode,
items: event.data.checkout.lineItems.map(item => ({
product_id: item.variant.product.id,
product_name: item.variant.product.title,
quantity: item.quantity,
price: item.variant.price.amount
}))
});
}
});
WooCommerce
Install the plugin:
- Download Zenovay WooCommerce plugin
- Plugins → Add New → Upload
- Activate and enter Website ID
- Auto-tracks products and orders
Manual integration:
Add to your theme's functions.php:
// 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>
if (window.zenovay) {
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>
if (window.zenovay) {
zenovay('track','purchase', {
order_id: '<?php echo $order_id; ?>',
revenue: <?php echo $order->get_total(); ?>,
currency: '<?php echo $order->get_currency(); ?>',
items: <?php echo json_encode(array_map(function($item) {
return [
'product_id' => $item->get_product_id(),
'product_name' => $item->get_name(),
'quantity' => $item->get_quantity(),
'price' => $item->get_total()
];
}, $order->get_items())); ?>
});
}
</script>
<?php
});
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() {
// Product page
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:
// Initialize tracking
<script
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
<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,
items: cart.items
});
}
// Purchase complete
function trackPurchase(order) {
zenovay('track','purchase', {
order_id: order.id,
revenue: order.total,
tax: order.tax,
shipping: order.shipping,
currency: order.currency,
items: order.items.map(item => ({
product_id: item.id,
product_name: item.name,
quantity: item.quantity,
price: item.price
}))
});
}
</script>
Essential E-commerce Events
Standard Event Schema
| Event | Required Properties | Optional |
|---|---|---|
product_viewed | product_id, product_name | price, category, variant |
add_to_cart | product_id, quantity | price, cart_value |
remove_from_cart | product_id | quantity |
checkout_started | cart_value | item_count, items |
purchase | order_id, revenue | items, tax, shipping |
Product Properties
{
product_id: "SKU-123", // Required
product_name: "Blue T-Shirt", // Required
price: 29.99, // Recommended
currency: "USD", // Recommended
category: "Apparel/T-Shirts", // Optional
variant: "Large/Blue", // Optional
brand: "Acme", // Optional
quantity: 1 // For cart events
}
Setting Up Conversion Funnels
E-commerce Funnel
Create the purchase funnel:
- Go to Goals → Funnels
- Click Create Funnel
- Add steps:
| Step | Event/Page |
|---|---|
| 1 | Product Viewed |
| 2 | Add to Cart |
| 3 | Checkout Started |
| 4 | Payment Info Added |
| 5 | Purchase Complete |
Category Funnels
Track category-specific behavior:
- Homepage → Category → Product → Cart → Purchase
- Useful for merchandising optimization
Revenue Dashboard Setup
Enable Revenue Tracking
- Go to Settings → E-commerce
- Enable Revenue Tracking
- Set default currency
- Configure revenue attribution
Key Metrics
The Revenue tab shows:
- Total Revenue: Sum of all orders
- Orders: Transaction count
- AOV: Average order value
- Conversion Rate: Visitors to purchasers
- Revenue per Visitor: RPV metric
Attribution Settings
Choose how revenue is attributed:
- Last Click: Credit to final traffic source
- First Click: Credit to discovery source
- Linear: Equal credit to all touchpoints
Product Analytics
Track Product Performance
View in Analytics → Products:
- Most viewed products
- Best sellers
- Conversion rates by product
- Revenue by product
Category Performance
Group products by category:
- Include category in product events
- View category analytics
- Compare category conversion rates
Cart Analytics
Track Cart Behavior
Automatic metrics:
- Add to cart rate
- Cart abandonment rate
- Average cart value
- Items per cart
Cart Events
// Cart updated
zenovay('track','cart_updated', {
cart_value: 149.99,
item_count: 3,
items: [...]
});
// Cart viewed
zenovay('track','cart_viewed', {
cart_value: 149.99,
item_count: 3
});
Testing Your Setup
Verify Tracking
-
Open your store
-
Enable debug mode:
localStorage.setItem('zenovay_debug', 'true'); -
Perform actions:
- View a product
- Add to cart
- Start checkout
- Complete test purchase
-
Check console for events
-
Verify in Zenovay dashboard
Test Purchase
Make a test purchase:
- Use test payment if available
- Complete full checkout
- Verify order appears in Revenue
- Check product attribution
Common Issues
Revenue Not Showing
- Check
purchaseevent fires on thank you page - Verify
revenueproperty is a number - Ensure event fires after script loads
Products Not Tracked
- Verify
product_viewedevent fires - Check product_id is consistent
- Ensure script is on all product pages
Cart Abandonment Wrong
- Track
checkout_startedconsistently - Fire
purchaseonly once per order - Don't track refunds as purchases
Best Practices
-
Use consistent product IDs
- Same ID across all events
- SKU or database ID works well
-
Include all transaction data
- Revenue, tax, shipping
- All line items
- Currency code
-
Track the full journey
- From first visit to purchase
- Include all touchpoints
-
Test thoroughly
- Verify on staging first
- Test all product types
- Confirm funnel accuracy