How to Integrate with WooCommerce

Last updated at:


Learn how to install the Klaviyo WooCommerce plugin and enable the WooCommerce integration in your Klaviyo account.

The main steps to integrating with WooCommerce are:

  • Install the Klaviyo WooCommerce plugin
  • Enable the WooCommerce integration in Klaviyo

We'll also walk through adding an opt-in checkbox to your WooCommerce checkout page and connect it to your Klaviyo subscription list. 

The WooCommerce integration syncs data into Klaviyo in real time.

Install the Klaviyo WooCommerce Plugin

The Klaviyo WooCommerce Wordpress plugin allows you to add a newsletter signup form to your website, enable website activity tracking, and get data about when people start checkouts and view products so you can send out abandoned cart emails. 

To upload the plugin head over to WooCommerce. Hover over the Plugins tab and click Add New
WooCommerce’s plugins dropdown, showing Installed Plugins, Add New, and Plugin Editor, with Add New selected

Search for Klaviyo within Search plugins. When you've located the Klaviyo plugin, click Install Now.
WooCommerce’s Add Plugins page, with Klaviyo in the search bar, and the Klaviyo plugin with Install Now in a blue box

Click Activate to activate the plugin. 
Klaviyo plugin in WooCommerce with Activate popup in a blue box

Your plugin is now installed. To configure your plugin you'll need your Public API Key / Site ID.

Switch over to Klaviyo and navigate to Account > Settings > API Keys. Copy your Public API Key.

Klaviyo’s API Keys page with list of Public API Keys and list of Private API keys, with a Create Private API Key in a blue button with Public API Key circled in red

Head back to WordPress and navigate to Plugins. Scroll down to find the Klaviyo plugin and click Settings.
WooCommerce’s plugins tab selected, showing Klaviyo plugin with Settings in a gray box


First, fill in your public API key, also known as your site ID. Paste the public API key you copied above. Then, check Enable Klaviyo signup forms to allow Klaviyo signup forms on your site. 

Next, choose whether you would like to disable configuration warning. This will stop the configuration warning from appearing. We recommend that you do not check this option. 

Finally, you have the option to Subscribe contacts at checkout. This option is separated by channel: SMS and email. You can enable one or both options; however, if you use both, we recommend that you set different lists (and thus list IDs).

To collect email subscribers, add in your preferred list ID in the field Klaviyo List ID for Email. Then, check the box next to Subscribe contacts to email marketing. Fill in the newsletter text below, or use the default text, which will appear on the checkout page. 

To collect SMS subscribers at checkout, you must have set up SMS for your account before you can enable this setting. Check out our guide here for more information on collecting SMS subscribers at checkout for WooCommerce

Klaviyo’s WooCommerce integration settings page with text boxes for Public API Key, Subscribe contacts at checkout, Email, and SMS with Save Settings button
Click Save Settings

Your plugin is updated directly through your WordPress store. Release Notes can be found bundles with your plugin updates. See Find the Release Notes at the end of this article for more information.

Enable the WooCommerce Integration

To enable the WooCommerce integration, first you'll create an API key and secret in your WooCommerce account. Then, you'll head over to Klaviyo and add the API and secret to your WooCommerce integration settings. 

From Wordpress, navigate to WooCommerce > Settings > Advanced > Rest API. Generate an API key and secret by clicking Add key.
WooCommerce’s Rest API within Advanced Settings with Create an API Key in a purple box

Fill in the Key details:

  • Description: type in a friendly name like "klaviyo"
  • User: keep the default user, or pick another one from the dropdown
  • Permissions: choose Read/Write

WooCommerce’s Rest API Key details with text boxes for Description, User, and Permissions, with Generate API Key in a blue box

Click Generate API key.

You've created a consumer key and a consumer secret. Keep this tab open because you'll need both these values in the next step. WooCommerce’s Rest API Key details, with Consumer key, Consumer secret, and QRCode

Update Your Integration Settings in Klaviyo

Switch into your Klaviyo account and navigate to Integrations. On the All Integrations tab search for the WooCommerce Integration. Then, click Add Integration.
WooCommerce integration listing in Klaviyo with Add Integration with arrow
Enter your integration settings:

  • Store URL: This is the same URL customers use to access your site (make sure to include the http protocol). 
  • WooCommerce Consumer Key: Paste the consumer key that you created in the previous step. 
  • WooCommerce Consumer Secret: Paste the consumer secret that you created in the previous step.
  • Global Currency Code: If you’d like to convert all currencies used by your shops to a single currency in Klaviyo, check Convert all currencies to one standard currency and select a global currency code from the dropdown list.
  • Enable Legacy API: If you are still using the V1 of the WooCommerce API, check this box to ensure proper function of the integration. V3 API is recommended for faster communication between WooCommerce and Klaviyo. You only need legacy if you are using a version lower than WooCommerce Version 3.5x (or later) and WordPress Version 4.4 (or later).

Klaviyo’s WooCommerce integration settings page with text boxes for Store URL, Consumer Key, Consumer Secret, and Connect to WooCommerce in a blue button

Click Connect to WooCommerce.

If you're experiencing trouble with this step, double-check that you're using the correct store URL, consumer key, and consumer secret. Note that the store URL is the same URL customers use to access your site.

Your data will begin to sync with Klaviyo in minutes. You've successfully enabled the WooCommerce integration.

If you receive an error message "Unable to test API by fetching order count. Invalid count" this means that when Klaviyo tries to validate the WooCommerce integration and get a count of orders, their API doesn’t return a value Klaviyo expects or it returns nothing at all. Since the integration hasn't officially connected to Klaviyo yet, this means that it needs to be resolved within WooCommerce. The best way to check would be to use an application like Postman to make an API call to the order count endpoint which will provide more insight into what is being passed to Klaviyo.
The endpoint you need is: {customers-url}/wc-api/v1/orders/count

Change {customers-url} to your WooCommerce store URL.

Test Your WooCommerce Integration

To test out your integration and plugin, go to your website and follow these instructions:

  1. Add an item to your cart.
  2. Go to the checkout page.
  3. Fill in your email address on the checkout page. 
  4. Go to your activity feed on your dashboard, look for the Started Checkout metric, and you should see your checkout appear.

Monitoring the Historical Data Sync

When you first integrate with WooCommerce, Klaviyo will sync the last 90 days of your WooCommerce data so you can get started right away with engaging your most recent customers. After the sync of your most recent 90 days of data, Klaviyo will begin your complete historical data sync. Depending on how many orders, customers, and products your store has, it can take anywhere from a few minutes to several days to sync all of your data.

Once the historical sync is complete, new WooCommerce data will sync to Klaviyo in real time.

To check the progress of the initial sync, click on the Analytics tab in the sidebar and click into Metrics.

Find the Placed Order metric and change the date range of the graph to see which dates have been fully synced. When the sync is complete, the WooCommerce integration in the Integrations tab will be marked complete. If you want to verify for yourself that all data from WooCommerce is synced, you can cross-check the total orders for a few days or a week. Before you start validating, make sure your account's timezone matches the settings in WooCommerce.

To check or update your account's timezone, go to the Account Settings page (found by clicking your account name, and then Account in the dropdown) and check the Contact Information > Organization section.

Data Synced into Klaviyo

WooCommerce sends ecommerce events over to Klaviyo which can be viewed within your Klaviyo account's Metrics. Navigate to the Analytics tab, click into Metrics, and select WooCommerce from the dropdown to view only WooCommerce events. Notice that WooCommerce events, except Added to Cart, are associated with a WooCommerce icon.

WooCommerce's Added to Cart event will appear with a gear icon, not with a WooCommerce icon.  It can be found by filtering by API in the dropdown.

WooCommerce metrics, in Klaviyo of Cancelled Order, Fulfilled Order, Ordered Product, Placed Order, Refunded Order and Started CheckoutKlaviyo API metric links of Active on Site, Added to Cart, and Viewed Product under a search bar

Klaviyo limits the number of unique metrics you can create to 200. When you approach this threshold, you will be alerted via a warning in your account, along with an email to the account owner.
  • Added to Cart metric is created when a customer (who has previously been cookied by Klaviyo) adds an item to their cart. 
  • Active on Site metric is created when a customer (who has previously been cookied by Klaviyo) visits your site. 
  • Viewed Product metric is created when a customer (who has previously been cookied by Klaviyo) views a product in your store. 
  • Started Checkout metric is created when:
    • A customer logs into their account, adds something to their cart, and then views the checkout page.
    • A customer adds something to their cart, views the checkout page, and enters a billing address.
  • Placed Order metric is created when a customer completes the checkout process and creates an order in WooCommerce.
  • Ordered Product metric is created when a customer places an order for a specific item. If a customer orders two of one item, two Ordered Product metrics are tracked.
  • Fulfilled Order metric is created when a customer order is marked "shipped" in your WooCommerce store.
  • Refunded Order metric is created when a customer refunds their order.
  • Cancelled Order metric is created when a customer creates an order in your WooCommerce store but then cancels the order before fulfillment. 
Note: By default, Klaviyo syncs the following statuses for Placed Order: processing, completed, refunded, cancelled.

For example, say a customer logs into their account and adds two red belts and a tan belt to their cart. A Started Checkout metric is tracked. Then, the customer places an order for the red belts and the tan belt. One Placed Order metric is recorded, and three Ordered Product metrics are recorded - two for each of the red belts and one for the tan belt. When the products are marked shipped, a Fulfilled Order metric is recorded.

Dive deeper and learn about the properties associated with each metric with Review and Understand your WooCommerce Data.

How do I upgrade my WooCommerce integration to real-time, if I integrated using the Legacy API?

To start, install the latest WooCommerce plugin by following the plugin installation steps described above. Next, create a REST API key for the v3 integration with read/write permissions. This is different from the Legacy API key you created when you first installed the plugin. 

Update your integration in Klaviyo by selecting Update Settings on the WooCommerce integrations settings page.

Please note that in order to use WooCommerce’s API v3 you must be on WC Version 3.5x or later and WP Version 4.4 or later.

Next Steps

Congratulations on getting set up! With your account setup and integrated, it's time to start using Klaviyo's core features. After you are done with the items in this category you'll be all set to get the most out of Klaviyo's features. Check out our Getting Started Handbook to ensure you're up and running to get the most from your Klaviyo account.

Once you get this far, don't stop! Klaviyo is a robust platform with a number of features, you can use to help your business grow.

Rebuilding Carts from an Abandoned Cart Flow

You can use WooCommerce Data to Rebuild Carts from an Abandoned Cart Flow.

We will generate a key on the Started Checkout event that allows you to create a link that rebuilds the customer's cart in case they return to their cart via an email triggered by this event on another device. You can create this link using the following url parameter in an Abandoned Cart flow email triggered by a Started Checkout:

/cart?wck_rebuild_cart={{ event.extra.CartRebuildKey }}

Assembled, the url should look like the following:

{{ organization.url|trim_slash }}/cart?wck_rebuild_cart={{ event.extra.CartRebuildKey }}

The dynamically-generated product title link pulls directly from the URL you have inserted in your account settings. If needed, this URL can be updated in the email template editor.

Button block in Klaviyo's email template editor showing button text, cart rebuild URL, cancel with grey background, and save with blue background

If you are using {{ organization.url }} to link to a non-secure HTTP URL, you will need to manually add your URL using HTTPS for the cart to rebuild correctly.

Using WooCommerce Subscriptions Data

Learn about using WooCommerce Subscriptions Data in Campaigns and Flows.

Install Plugin Updates

Plugin updates can now be installed directly from your WordPress Admin page. When an update is available, you'll see an alert next to your Plugins tab.  Click on your Plugins tab, scroll down to find the Klaviyo plugin, and install the update. 
Klaviyo listing on the WooCommerce plugins page, with Settings, Deactivate, and View details outlined in blue
If you prefer, you can still download the Klaviyo WooCommerce plugin manually from the Wordpress store. 

Find the Release Notes

Release Notes are bundled with each new plugin update. View the ChangeLog file included with each WooCommerce plugin update for details.

To find your WooCommerce Plugin Release Notes, select Plugins from your WooCommerce Admin page. Then scroll down to find the Klaviyo plugin. Click View Details, and then select the Changelog tab.

Additional Resources

Was this article helpful?
694 out of 1063 found this helpful