If you’re using Klaviyo for email marketing and not tracking conversions properly, you’re flying blind. Email-to-website tracking is what bridges the gap between “someone opened the email” and “someone actually bought something”. Without it, you’re left guessing which campaigns are generating revenue and which ones just look good.
This guide will walk you through two ways to properly set up Klaviyo tracking: the manual method (ideal for custom or less common platforms) and the native integration route for eCommerce businesses using Shopify, WooCommerce, or similar platforms.
Why conversion tracking in Klaviyo matters
Let’s be clear, if your Klaviyo account isn’t tracking on-site actions, you’re missing out on one of its most powerful features. Proper tracking allows you to:
-
Attribute revenue to specific email campaigns and flows
-
Trigger automated emails based on actual customer behaviour
-
Build highly targeted segments based on browsing and purchase data
-
See what’s really working, not just what’s getting clicks
If you’re investing in email, this data is essential for decision-making. Without it, you’re running your email strategy in the dark.
Step 1: Turn on email-to-website tracking
Before adding any code or connecting your platform, start with this simple setting:
-
In Klaviyo, go to Settings > Email > Tracking
-
Tick Email-to-Website Tracking
-
Click Learn More to familiarise yourself with how UTM parameters will be applied
This step ensures that Klaviyo adds tracking parameters to the links in your emails, so clicks from your campaigns can be tracked in Google Analytics and other platforms.
![]()
Step 2: Choose your setup method
Now it’s time to track what happens after someone lands on your website. There are two main ways to do this:
Option A: Manual setup (for custom websites & non-native platforms)
If your website doesn’t support direct Klaviyo integration, you’ll need to add a small JavaScript snippet to enable on-site tracking.
Here’s the code:
// Replace PUBLIC_API_KEY with your real public API key.
<script
async type=“text/javascript”
src=“//static.klaviyo.com/onsite/js/PUBLIC_API_KEY/klaviyo.js”
></script>
<script>
klaviyo.identify({
// Change the line below to dynamically print the user’s email.
’email’ : ‘{{ email }}’
});
</script>
Where to place it:
Add this just above the closing </body> tag on your website, ideally in your site’s footer template. If you’re already using Google Analytics or other scripts, place Klaviyo’s code directly above or below them.
This script enables Klaviyo to:
-
Track when users land on your site from an email
-
Identify users by email if they click from a campaign
-
Track behaviours like product views or purchases (with additional setup)
To get your Public API key:
-
Go to Settings > Account > API Keys
-
Copy your Public API Key
-
Paste it into the script above
If you need to trigger flows or sync data with external systems, you can also generate a Private API Key here for more advanced use cases.
Option B: Use Klaviyo’s native eCommerce integrations (recommended)
If you’re using a popular eCommerce platform like Shopify, WooCommerce or BigCommerce, use Klaviyo’s native integrations instead of the manual setup. They install the necessary tracking automatically and go much further by syncing customer, order and product data in real time.
For Shopify:
-
In Klaviyo, go to Integrations > Add Integrations
-
Select Shopify and enter your store URL
-
Follow the prompts to connect your Shopify store to Klaviyo

Once connected, Klaviyo automatically installs tracking for:
-
Viewed Product
-
Added to Cart
-
Checkout Started
-
Placed Order
-
Active on Site
You also get automatic syncing of customer data, product feeds and historical purchase history, all of which help you build better flows and segments from day one.
For WooCommerce:
-
Install the Klaviyo for WooCommerce plugin from the WordPress plugin directory
-
Go to the plugin settings and enter your Public and Private API Keys
-
The plugin will start syncing orders, customers, and behaviour data immediately

For other platforms like BigCommerce, Magento or Salesforce Commerce Cloud:
-
Go to Integrations > All Integrations in Klaviyo
-
Search for your platform
-
Follow the step-by-step instructions provided
These integrations are constantly being improved and save hours of dev time compared to setting things up manually.
Manual vs native: Which should you use?
| Scenario | Recommended Setup |
|---|---|
| Shopify or Shopify Plus | Use Klaviyo’s Shopify Integration |
| WooCommerce | Use the Klaviyo Plugin |
| Magento, BigCommerce, etc. | Use Klaviyo’s built-in integration |
| Custom CMS / Static Sites | Manual JavaScript setup |
| Headless commerce | Likely a mix of API and JS tracking |
In short: use a native integration if one exists. Manual setup is your fallback if you’re working with a bespoke setup or unsupported CMS.