---
title: "Getting started with Shift4Shop"
description: "Learn how to integrate Shift4Shop (formerly 3dcart) with Klaviyo in order to personalize and target emails based on each customer's purchases and website activity. The data synced from Shift4Shop to Klaviyo includes:"
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/115005083107"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/115005083107.md"
locale: "en-us"
category: "Integrations"
section: "Shift4Shop"
updated: "2026-10-28"
---

# Getting started with Shift4Shop

## You will learn

Learn how to integrate Shift4Shop (formerly 3dcart) with Klaviyo in order to personalize and target emails based on each customer's purchases and website activity. The data synced from Shift4Shop to Klaviyo includes:

- Data about orders your customers make, including sales, fulfilled orders, and cancelled orders

- Customer details from orders, including email addresses, names, and phone numbers



Website visits and product views are tracked separately after you add Klaviyo onsite tracking to your site.

**📝 Note:** The initial order sync uses a 3-year lookback based on when orders were last updated and imports customer details from those orders.

## Table of contents

1. Add the Shift4Shop Integration

2. Add Klaviyo onsite tracking

3. Monitor the data sync

4. Data synced from Shift4Shop

5. Update your Shift4Shop integration

6. Additional resources



## Add the Shift4Shop integration

1. In Klaviyo, select the **Integrations** tab.

2. Select **Explore apps**.

3. Search for *Shift4Shop* and click the card, then click **Install**.

4. To find your Shift4Shop store URL (also known as your secure URL), open your Shift4Shop account in a new tab.

5. In Shift4Shop, go to **Settings > General > Store Settings**.

6. Under Store Information, click on **Manage Domain & Store URL**.




![Shift4Shop settings page showing store information](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/b4c55cd8b558acf63d7c49025e630de9035c9ca8-1678x1118.jpg?auto=format)

7. Copy the Store URL from beneath Domain Settings.




![Shift4Shop domain settings showing store URL](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/1bdcc7352545fce9acd4869b8e0fa487d8cfb72f-860x448.png?auto=format)

8. Back in Klaviyo, paste your Store URL in the box and click **Connect to Shift4Shop**.


9. Copy the Klaviyo public API key that appears on the next page.




![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/2c6bca07ae8b1b30e75e2fdb721bb5a653f0b296-1504x890.png?auto=format)

10. Click the **Go to Shift4Shop** button.

11. On the *REST API Apps* page in Shift4Shop, click **Add** in the top right hand corner to add the Klaviyo API key.




![REST API Apps page in Shift4Shop with Add button with blue background](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/0d91eabf0b36ca0ac2c41fcba539a9d36476cc13-1552x370.png?auto=format)

12. Paste the **Klaviyo public API key** you copied from the Shift4Shop integration setup page.



![Public key setting in Shift4Shop with Save button with blue background](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/78986f7d800974ea54fa65399ab045f140fafb4e-1196x340.png?auto=format)

13. Click **Save**.

14. A popup window will appear, asking you to give Klaviyo authorization to pull the Shift4Shop data into our platform; click **Authorize**.




![Klaviyo settings in Shift4Shop showing required permissions with Authorize button with blue background](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/fc431b5551ba7e85be87e2650773b98b61783626-1194x1316.jpg?auto=format)

15. You will be redirected back to your Klaviyo account. A confirmation modal will indicate that your Shift4Shop account is connected and historical data has started syncing.



## Add Klaviyo onsite tracking

There are 2 Klaviyo onsite tracking code snippets you can add to your Shift4Shop site. The first onsite tracking snippet allows you to track when cookied users are active on your site (the *Active on Site* metric) and the second onsite tracking snippet allows you to track what products they view (the *Viewed Product* metric).

You can then use the *Active on Site* metric to create segments of known browsers who have visited your site but haven't purchased anything. The *Active on Site* snippet (also known as Klaviyo.js) also enables the use of Klaviyo sign-up forms. 

*Viewed Product* tracking is most often leveraged to trigger a Browse Abandonment automated email flow. For more information, see our article on [creating a browse abandonment flow](https://help.klaviyo.com/hc/en-us/articles/115002775252.md).

1. Log in to your Shift4Shop store admin and navigate to **Content > Site Content**.

2. Click on the **Edit** button under Header & Footer.




![Site Content page in Shift4Shop with Edit with blue background under Header and Footer](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/8ea5dea388d051ed291774a7f77c83bda191c8e4-2244x876.jpg?auto=format)

3. Click the **+** to the right of Global Header to open the header editor.




![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/bad6bd45cb7ac2064b3755e2e01f99e81952b200-1562x510.png?auto=format)

4. Click the slider next to *WYSIWYG Mode Off / On* to toggle the view to the HTML editor.




![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/5e36af886995d6558987aaf2b339d0605ded5c9f-1576x554.png?auto=format)

5. To add *Active on Site* tracking, paste the following script at the bottom of the HTML editor:




```text
<script type="text/javascript" async="" src="https://static.klaviyo.com/onsite/js/PUBLIC_API_KEY/klaviyo.js"></script>
<script type="text/javascript"> 
//Initialize Klaviyo object on page load
!function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(n,i){return"push"===i?function(){var n;(n=window._klOnsite).push.apply(n,arguments)}:function(){for(var n=arguments.length,o=new Array(n),w=0;w<n;w++)o[w]=arguments[w];var t="function"==typeof o[o.length-1]?o.pop():void 0,e=new Promise((function(n){window._klOnsite.push([i].concat(o,[function(i){t&&t(i),n(i)}]))}));return e}}})}catch(n){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var n;(n=window._klOnsite).push.apply(n,arguments)}}}}(); </script>
```

1. In Klaviyo, click your account name, then go to **Settings > API keys** and copy your **Public API Key / site ID**. Replace `PUBLIC_API_KEY` in the first line of the snippet with this value. Use your account’s site ID here, not the app authorization key copied during the Shift4Shop integration setup.

2. To add *Viewed Product* tracking, add this script underneath the *Active on Site* script in the header:



```text
<script type="text/javascript">
var klaviyo = window.klaviyo || [];

// Track each product view.
if ('[price]' !== '[' + 'price]') {
   klaviyo.track("Viewed Product", {
      ProductID: "[id]",
      Name: "[name]",
      Description: "[description]",
      URL: [location.protocol, '//', location.host, location.pathname].join(''),
      Categories: "[catid]",
      ImageURL: [location.protocol, '//', location.host, '/[image1]'].join(''),
      Price: parseFloat("[price]".slice(1), 10)
   });
}</script>
```

1. In the top right corner of the page, click **Save**.



After saving, [test your onsite tracking](https://help.klaviyo.com/hc/en-us/articles/115005076767.md) to confirm that Active on Site and Viewed Product events appear when an identified visitor browses your site.

## Monitor the Klaviyo sync

To view your Shift4Shop integration data:

1. In your Klaviyo account, navigate to **Analytics > Metrics**.

2. Click the **Placed Order** metric for Shift4Shop to verify that data has started to populate. Data in the chart shows that orders are syncing, but does not mean the historical import is complete.

3. To check historical import progress, go to **Integrations > Shift4Shop > Data** and review **Historical data**. When the import finishes, this section confirms that the data has been synced.



![Shift4Shop integration card in Klaviyo with green bar on the left](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/04314803b2c693831d7e4a4e0c73ca8e1d7cf70a-1900x186.png?auto=format)

4. After the historical import finishes, compare a sample of eligible Shift4Shop orders with the **Placed Order** events in Klaviyo. By default, orders with statuses 2 and 4 create these events, using the order’s last-updated time.

5. If dates or daily totals differ, check that both accounts use the same time zone. In Klaviyo, click your account name, then go to **Settings > Account**.

6. In the **Time zone** section, select the correct time zone and click **Save**.



## Data synced from Shift4Shop 

The Shift4Shop integration syncs data into Klaviyo once every hour. API delays or rate limits can cause events to take longer than 1 hour to appear.

The following metrics are synced from Shift4Shop:

- Cancelled Order

- Fulfilled Order

- Ordered Product

- Placed Order

- Started Checkout



![Klaviyo metrics tab filtered by Shift4Shop showing metrics such as Fulfilled Order and Ordered Product](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/c9548345d16f3c90452d0e4ac652c0e775d44dc7-1704x588.jpg?auto=format)

### Cancelled Order

This event is tracked when an order is cancelled in Shift4Shop (status 5). It includes the order’s items and categories.

### Fulfilled Order

This event is tracked when an order is fulfilled in Shift4Shop (status 4). It includes all the product information about the items someone purchased including product names, images, and variation information to use in purchase follow-up emails. You can filter and target *Fulfilled Order* events based on the following criteria:

- ItemNames: the names of the products in someone's order, e.g., t-shirt or pants

- Categories: the complete set of the categories of the products in someone's order, e.g., t-shirts, men's, pants, and sale



### Ordered Product

This metric is tracked when an eligible order creates a Placed Order event, and records an event for each unit purchased, up to 100 units per item in an order. For example, if someone buys a t-shirt and a pair of pants, 2 *Ordered Product* events are created: 1 for the t-shirt and 1 for the pants.

The *Ordered Product* event includes detailed information about each product someone purchases. This is useful when creating behavioral segments based on individual product names, SKUs, and categories. You can filter and target *Ordered Product* events based on the following criteria:

- Name: the name or title of the product in Shift4Shop, e.g., t-shirt or pants

- SKU: the SKU of the product variation e.g., REDMEDIUMTSHIRT

- Categories: the complete set of the categories of the product, e.g., t-shirts, men's, and sale



### Placed Order

This event is tracked when a customer completes the checkout process and creates an order in your Shift4Shop store. It includes all of the product information about the items someone purchased including product names, images, and variation information to use in purchase follow-up emails. You can filter and target *Placed Order* events based on the following criteria:

- ItemNames: the names of the products in someone's order, e.g., t-shirt or pants

- Categories: the complete set of the categories of the products in someone's order, e.g., t-shirts, men's, pants, and sale



Note: By default, Shift4Shop syncs 2 statuses for Placed Order: 2, 4

### Started Checkout

This event is tracked when Klaviyo syncs a Shift4Shop checkout or order with a valid billing email address and, by default, status 2, 4, or 7. It includes all of the product information about the items in someone's cart, including product names, images, and variation information to use in your abandoned cart emails. You can filter and target *Started Checkout* events based on the following criteria:

- ItemNames: the names of the products in someone's cart, e.g., t-shirt or pants

- Categories: the complete set of the categories of the products in someone's cart, e.g., t-shirts, men's, pants, and sale



### Customer data

In addition to metrics, Klaviyo imports customer details from orders. You can use these profile properties in segments and flows. The following properties are synced when available:

- Email

- First Name

- Last Name

- Phone Number



Klaviyo can also estimate the following location details from the IP address supplied with an order. These are not copied from the order’s billing or shipping address:

- City

- State/Region

- Country



## Outcome

You’ve now integrated with Shift4Shop, enabled Klaviyo onsite tracking, and verified your synced Shift4Shop data. Now, you can view your Shift4Shop data in Klaviyo and personalize and target emails based on each customer's purchases and website activity. 

## Update your Shift4Shop integration

**📝 Note:** If you integrated Klaviyo with Shift4Shop before May 12, 2025 and have not updated the app, follow the steps below to switch to **Klaviyo v2**. The deadline to update from the old app was September 6, 2025.

To update to **Klaviyo v2**, re-authenticate your Shift4Shop integration in Klaviyo. You do not need to reinstall Klaviyo onsite tracking.

1. In Klaviyo, click the **Integrations** tab.

2. Select **Shift4Shop** from the list of enabled integrations.

3. In the upper right corner, click **Manage integration**.

4. Select **Re-authenticate**.

5. Copy the Klaviyo public API key.

6. Click the **Go to Shift4Shop** button.

7. On the *REST API Apps* page in Shift4Shop, click **Add** to add the Klaviyo API key, and paste the key.

8. Click **Save**.

9. On the authorization request modal that appears, click **Authorize**.

10. You will be redirected back to your Klaviyo account, where a confirmation modal will indicate that your Shift4Shop account is now connected.



Your integration has now been updated and will begin using the new app. 

While not necessary, you may wish to remove the deprecated Klaviyo app from your *Connected Apps* in Shift4Shop. To do so, remove the "Klaviyo" app from the Shift4Shop REST API Apps page.

## Additional resources

- [Getting started with Klaviyo onsite tracking](https://help.klaviyo.com/hc/en-us/articles/115005076767.md)
  Learn about the different ways that Klaviyo can support onsite tracking on your ecommerce site. There are 2 key types of onsite tracking:
- [How to update Klaviyo after switching ecommerce platforms](https://help.klaviyo.com/hc/en-us/articles/360003124151.md)
  Learn about the areas of Klaviyo that need to be updated when you switch from one ecommerce platform to another. It is completely possible to switch ecommerce platforms while keeping the same Klaviyo account, but there are some important steps to keep in mind to ensure that your sign-up forms, flows, and other Klaviyo features continue to perform as expected.
