How to Integrate with WooCommerce

read
Last updated at:

Overview

This article walks through enabling 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
WooInt1.png

Search for Klaviyo within Search plugins. When you've located the Klaviyo plugin, click Install Now.
WooInt2.png

Click Activate to activate the plugin. 
WooInt3.png

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 API Key.mceclip0.png

Head back to WordPress and navigate to Plugins. Scroll down to find the Klaviyo plugin and click Settings.
WooInt5.png

 

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

2021-03-17_13-56-17.png
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.
WooInt7.png

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

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. 

If you've set up SMS in Klaviyo, WooCommerce allows you to collect SMS subscribers at checkout. This option is not on by default, so if you want to enable it, check out this article on enabling SMS consent at checkout for WooCommerce

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.

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).mceclip0.png

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 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 are associated with a WooCommerce icon.mceclip0.png

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. 
  • 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: 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. 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:

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

Assembled, the url should look like the following:

{{ organization.url }}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. You may need to add a forward slash to your URL parameters between {{ organization.url }} and cart to resolve any errors with the destination URL. To add the forward slash, navigate to Table Block > Rows > Column 2 and double click the hyperlinked product title tag. Add the forward slash to the URL in the window and click OK.

forwardslash.png

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. 
Woo_Plugin_update.png
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.

woocomm_find_release_notes.gif

Additional Resources

x
Was this article helpful?
602 out of 935 found this helpful