Skip to main content
8 min read

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:

MethodBest ForSetup Time
Shopify AppMost stores, automatic updates2 minutes
Theme InstallationCustom tracking, full control5 minutes
Shopify PlusAdvanced checkout tracking10 minutes

Installation

  1. Visit the Zenovay app in the Shopify App Store
  2. Click Add app
  3. Review permissions and click Install
  4. Connect your Zenovay account or create a new one
  5. 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

  1. Go to Online StoreThemes
  2. Click ActionsEdit code
  3. Open theme.liquid (under Layout)
  4. 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 SettingsCheckoutOrder status pageAdditional 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:

  1. Install the Zenovay Shopify app
  2. Go to SettingsCheckoutCustomize
  3. Add the Zenovay Tracking app block
  4. Position it in the checkout flow

Automatic Events

Zenovay automatically tracks these Shopify events:

EventDescriptionData Captured
page_viewEvery page visitedURL, referrer, timestamp
product_viewedProduct page visitsProduct ID, name, price, category
collection_viewedCollection page visitsCollection ID, name
add_to_cartItems added to cartProduct, quantity, value
checkout_startedCheckout initiatedCart value, item count
purchaseOrder completedTransaction 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

MetricDescription
RevenueTotal tracked revenue
TransactionsNumber of purchases
Average Order ValueRevenue ÷ Transactions
Conversion RatePurchases ÷ Sessions
Cart Abandonment RateCarts not converted

Funnel Analysis

Visualize your conversion funnel:

  1. Store visit → Product view
  2. Product view → Add to cart
  3. Add to cart → Checkout started
  4. Checkout started → Purchase

Identify where customers drop off and optimize those pages.


Troubleshooting

Script Not Loading

Symptoms: No data in Zenovay dashboard

Solutions:

  1. Check browser console for errors
  2. Verify tracking code is correct
  3. Ensure script is in theme.liquid, not a template
  4. Check if ad blockers are blocking (use first-party tracking)

Duplicate Page Views

Symptoms: Page views count is 2x expected

Solutions:

  1. Ensure tracking script is only added once
  2. Check for both app and manual installation
  3. Remove tracking from individual templates if in theme.liquid

Missing Purchase Events

Symptoms: Transactions not tracked

Solutions:

  1. For Shopify Plus: Add script to checkout additional scripts
  2. Verify first_time_accessed condition is used
  3. Check that order status page script is executing

Events Not Matching Revenue

Symptoms: Tracked revenue doesn't match Shopify

Solutions:

  1. Ensure currency conversion is correct
  2. Check for missing transactions (script timing)
  3. Verify price extraction removes currency symbols

Privacy Configuration

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

MetricImpact
LCPNo impact (deferred loading)
FIDNo impact (async execution)
CLSNo impact (no DOM changes)

Best Practices

  1. Use the Shopify app when possible for automatic updates
  2. Enable first-party tracking for better data accuracy
  3. Track custom events for important interactions
  4. Set up conversion goals for key actions
  5. Review funnels weekly to identify optimization opportunities


Need help? Contact [email protected] or visit our Help Center.

Was this page helpful?