How to enable onsite tracking for Shopify

Estimated 3 minute read
|
Updated Nov 13, 2024, 1:21 PM EST
You will learn

You will learn

Learn how to enable Klaviyo onsite tracking on your Shopify store, which includes multiple events to help you engage identifiable browsers. Additionally, enabling onsite tracking allows you to use Klaviyo sign-up forms on your site. 

Before you begin

Before you begin

Before enabling the app embed, ensure that you’ve integrated Shopify with Klaviyo. When integrating, please note that enabling the settings in "Sync data from Shopify" and "Sync data to Shopify" will help you see more onsite tracking events in your account due to more profiles syncing. 

Additionally, please note the following:

  • You can enable the app embed and onsite tracking settings at any time, regardless of when you integrate.
  • The app embed for your Klaviyo account can only be associated with 1 Shopify store.
  • Have you recently added a brand new theme to your Shopify store? If so, you'll need to re-enable the app embed by following the instructions in this article. 

Based on your Customer Privacy settings in Shopify, Klaviyo may not track onsite events for visitors to your Shopify store in the EU, EEA, UK and Switzerland, unless they have provided consent.

About onsite tracking for Shopify

About onsite tracking for Shopify

Klaviyo onsite tracking is enabled by turning on our app embed in Shopify and making sure certain settings are selected within Klaviyo. Once it’s enabled, we’ll track the following events for identified browsers on your store:

  • Active on Site
    Triggered when someone visits your store. This event helps you segment your contacts based on engagement level.
  • Viewed Product
    Triggered when someone views a product page on your store. Use this event to send reminders to customers in a browse abandonment flow
  • Viewed Collection
    Triggered when someone views a collection on your store.
  • Submitted Search
    Triggered when someone submits a search on your store.
  • Added to Cart
    Triggered when someone adds an item to their cart.

All of the events above are branded with the Shopify icon when they sync to Klaviyo, except Active on Site and Viewed Product, which have a gear icon. Shopify-branded tracking events are synced via a Shopify pixel, while gear events are tracked by Klaviyo via a snippet installed by our app embed. 

Enabling the Klaviyo app embed in Shopify

Enabling the Klaviyo app embed in Shopify

  1. In Klaviyo, click your account name in the lower left corner and select Integrations
  2. Click Shopify to access the integration settings page.
  3. In the Onsite tracking section, check Track behavioral events to enable tracking for Viewed Collection, Submitted Search, and Added to Cart. Note that Viewed Product is enabled by default, so it will start tracking once you enable the app embed, along with Active on Site.
  4. You’ll see a message calling out that your Klaviyo app embed is turned off. Click Turn on to be brought to Shopify.
  5. If prompted, sign in to Shopify using the account you integrated with Klaviyo.
  6. You’ll be brought to your theme setting’s App embeds tab. Make sure the Klaviyo app embed is toggled on.
  7. Click Save in your theme editor.
  8. Navigate back to your Shopify integration settings page in Klaviyo, and refresh the page if needed. You should see a green banner indicating that your app embed is now enabled.
Test onsite tracking

Test onsite tracking

There may be a small delay until onsite tracking events start to sync after enabling them. We recommend waiting 15 minutes before testing. 

To confirm that onsite tracking is working, follow these steps:

  1. Navigate to your Shopify site.
  2. On your homepage, add the following to the end of the URL, replacing example@gmail.com with your email address:
    ?utm_email=example@gmail.com
  3. Reload the page.
  4. Navigate to a product page on your site.
  5. Navigate back to Klaviyo and search for your email address.

You will see that a Klaviyo profile has been created for you (if one didn't exist already), and that Active on Site and Viewed Product metrics have tracked on your activity feed. 

Outcome

Outcome

You have now enabled and tested Klaviyo onsite tracking on your Shopify store. 

Additional resources

Additional resources

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Live training
Join a live session with Klaviyo experts to learn about best practices, how to set up key features, and more.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type