---
updatedAt: 2026-11-03T17:10:16.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Integration with CMS

<p align="right" style={{color: 'grey'}}>
  <a href="https://docs-ua.esputnik.com/docs/instrukciya-z-integraciyi-cms" style={{color: 'grey', textDecoration: 'none'}}>
    <em>
      Read this article in Ukrainian ⮕
    </em>
  </a>
</p>

Integrating your CMS platform with **eSputnik** allows online store owners to quickly start using advanced marketing tools without relying on in-house developers. This integration covers the following steps:

* Syncing CMS contact and order data with eSputnik
* Tracking user behavior via events
* How to configure Web Push subscriptions
* (Optional) How to set up a product feed for generating product recommendations on the site and in messages

Once integration is complete, CMS users can connect their store to eSputnik, set up additional [media channels](https://docs.esputnik.com/docs/what-is-esputnik#messages), and launch omnichannel campaigns directly from the eSputnik interface — no extra development needed.

> 📘 Note
>
> To simplify configuration, you can use a real-world example of a full-featured integration in our <a rel="nofollow" href="https://github.com/Yespo-CDP/yespo-shopify" target="_blank">Yespo-Shopify</a>, <a rel="nofollow" href="https://github.com/eSputnik-CDP/esputnik-opencart" target="_blank">eSputnik-OpenCart</a> and <a rel="nofollow" href="https://github.com/Yespo-CDP/yespo-woocommerce" target="_blank">Yespo-WooCommerce</a> GitHub Repositories. You may also find the following guides helpful:
>
> * [Installing Plugin for WooCommerce Sites](https://docs.esputnik.com/docs/installing-plugin-for-woocommerce-sites)
> * [Integrating with Shopify](https://docs.esputnik.com/docs/integrating-with-shopify)

## 1. Contact Data Synchronization

### 1.1 Syncing New Contacts

**Purpose:** After the integration is enabled, all new contacts created in the CMS are automatically synced to eSputnik in real time.

Using contact identifiers such as `externalCustomerId`, `email`, and `phone` helps avoid duplicates, even if the contact already exists in eSputnik.

**Implementation:** Use the [Add/update a contact](https://docs.esputnik.com/reference/addcontact-1) API.

### 1.2 Importing Existing Contacts

**Purpose:** Historical contacts that existed in the CMS before the integration can be imported into eSputnik as part of the initial setup. As mentioned above, eSputnik identifies and merges existing contacts using `externalCustomerId`, `email`, and `phone`, so no duplicates are created.

**Implementation:** Use the [Add/update contacts](https://docs.esputnik.com/reference/contactsbulkupdate-1) API.

* Contacts that fail to import are flagged with an error, with its description
* Monitor import status via the [Get contact import status](https://docs.esputnik.com/reference/getimportsessionstatus-1) API

### 1.3 Updating Contacts

**Purpose:** When a contact's email, phone number, or other details change in the CMS, eSputnik updates the corresponding profile — or creates it if it doesn't exist.

**Implementation:** Use the [Add/update a contact](https://docs.esputnik.com/reference/addcontact-1) API.

### 1.4 Deleting Contacts

**Purpose:** Contacts deleted in the CMS are also removed from eSputnik (1st deletion type) or deactivated (2nd deletion type).

**Implementation:** Handle both deletion types:

1. **GDPR-compliant deletion:** Use [Delete contact by externalCustomerId](https://docs.esputnik.com/reference/deletecontact-1) API with `erase=true`.
   * This deletion removes all contact data from the eSputnik  database and anonymizes orders
2. **Regular/manual deletion:** Use the same API with `erase=false`.

   * Manually deleted contacts are marked as deleted, but profiles still exist at a separate tab and are still linked to orders; they can be restored in eSputnik

### Additional Contact Data Sources

#### Newsletter Subscriptions via Widgets

**Purpose:** Contacts subscribing via the eSputnik widget are added directly to eSputnik, bypassing the CMS.

**Implementation:** Ensure support for all configurations:

* Both eSputnik and CMS forms are enabled
* eSputnik form only
* CMS form only

> 📘 Note
>
> To use eSputnik widgets, [register a domain](https://docs.esputnik.com/reference/createdomain), and [receive](https://docs.esputnik.com/reference/getscript) and install the web tracking script

#### Web Push Subscriptions

**Purpose:** When a user subscribes to Web Push on the CMS site, eSputnik creates a contact with a Web Push token, allowing notifications to be sent to this contact.

**Implementation:** [Enable Web Push configuration](https://docs.esputnik.com/docs/cms-integration-guide#4-web-push-subscription-configuration) in the CMS and ensure correct token transfer.

#### Contacts from Orders

##### Using Generate event API

**Purpose:** When receiving an order, eSputnik identifies the contact via `externalCustomerId` and/or `locator` (`phone`/`email`). If the contact is not found, a new one will be created.

**Implementation:** Use the [Generate event v3](https://docs.esputnik.com/reference/registerevent_2) API.

<Callout icon="📘" theme="info">
  Check out [the guide](https://docs.esputnik.com/docs/sending-orders-via-the-api-resource-generate-event) on using Generate event to send orders
</Callout>

##### Using Add orders API

**Purpose:** Same as above.

**Implementation:** Use the [Add orders](https://docs.esputnik.com/reference/ordersbulkinsert-1) API.

##### Contacts from PurchasedItems Web Tracking Event

**Purpose:** When a customer places an order on the CMS store, a contact is created in eSputnik via the `PurchasedItems` event. Whether the contact is new or already exists, it will be mapped with the web tracking event via the `CustomerData` event.

**Implementation:** Send [JavaScript-based web tracking events](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests) from the CMS store.

#### Account Creation and Login

**Purpose:** eSputnik receives identification data when users sign up or log in.

**Implementation:** Send the [CustomerData](https://docs.esputnik.com/docs/how-to-transfer-website-behavior-data-through-rest-api#customerdata)  web tracking event when:

* A user creates a new account
* A user logs in

> 📘 Note
>
> * The `CustomerData` event alone doesn’t create or update contacts. Use the same logic as in the **Receiving Contacts** and **Updating Contacts** sections
> * If a contact is unknown, eSputnik uses cookies to track anonymous behavior and links it upon login or registration

## 2. Order Data Synchronization

### 2.1 New Orders

**Purpose:** After the integration is enabled, all new orders created in the CMS are automatically synced to eSputnik in real time.

**Implementation:**

* Use [Add orders](https://docs.esputnik.com/reference/ordersbulkinsert-1) and/or [Generate event v3](https://docs.esputnik.com/reference/registerevent_2) API
* Map order statuses between CMS and eSputnik and make sure that up-to-date statuses are always synced to eSputnik

### 2.2 Importing Existing Orders

**Purpose:** Historical orders data that existed in the CMS before the integration can be imported into eSputnik as part of the initial setup.

**Implementation:** Use the [Add orders](https://docs.esputnik.com/reference/ordersbulkinsert-1) or [Generate past events V3 API](https://docs.esputnik.com/reference/sendhistoryevents_2).

### 2.3 Order Updates

**Purpose:** eSputnik reflects updated order data and statuses. When an order’s details or status change in the CMS, eSputnik updates the corresponding order, or creates it if it doesn't exist

**Implementation:**

* Use [Add orders](https://docs.esputnik.com/reference/ordersbulkinsert-1) and/or [Generate event v3](https://docs.esputnik.com/reference/registerevent_2) API
* Maintain consistent status mapping (synced to eSputnik)

### Additional Order Data Sources

#### Orders from Web Tracking

**Purpose:** Orders are created in eSputnik when customers complete a purchase in the CMS store.

**Implementation:** Use the [PurchasedItems](https://docs.esputnik.com/docs/how-to-transfer-website-behavior-data-through-rest-api#purchaseditems)  web tracking event.

## 3. Website Visitor Behavior Tracking

### Purpose

Track behavioral data to:

* Build audience segments
* Launch personalized omnichannel campaigns
* Trigger automations like abandoned cart or view
* Power product recommendations with AI

### Implementation

1. [Register a domain](https://docs.esputnik.com/reference/createdomain).
2. [Receive](https://docs.esputnik.com/reference/getscript) and install the eSputnik web tracking script (skip this step if it is already installed for widgets).
3. Configure the product feed (via [UI](https://docs.esputnik.com/docs/importing-a-product-feed) or [API](https://docs.esputnik.com/reference/configureproductfeeds)).
4. Track events from the [front end](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests), the [back end](https://docs.esputnik.com/docs/how-to-transfer-website-behavior-data-through-rest-api), or both — ensure flexibility regardless of the store’s UI configuration options. For example, you can track `CustomerData`, `StatusCart`, and `PurchasedItems` events from the back end and the rest from the front end.

> 📘 Note
>
> If you transfer the `StatusCart` event via the back end, you cannot configure the recommendations display for the cart. In this case, the technical `StatusCartPage` event is used to detect the cart page.

### Required Events

The [Transferring Website Behavior Data via REST API](https://docs.esputnik.com/docs/how-to-transfer-website-behavior-data-through-rest-api) article provides the full list of web tracking events; below are listed the necessary ones:

* [PageView](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#page-view) : Auto-triggered after script installation
* [ProductPage](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#product-card)
* [StatusCart](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#cart) : Use variation ID as a product key if variations are handled on the website
* [PurchasedItems](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#purchase) : Use variation ID as a product key if variations are handled on the website; purchase triggers contact/order creation. Also, when using variation, make sure you pass the variation ID via orders and/or event API
* [CustomerData](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#customer)
* [CategoryPage](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#category)
* [ProductImpression](https://docs.esputnik.com/docs/how-to-transfer-website-behavior-data-through-rest-api#productimpressions) : Used to display impressions of recommendation blocks in **Reports**
* [NotFound](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#404-page) : Tracks the 404 page; required for displaying recommendations on the site
* [MainPage](https://docs.esputnik.com/docs/setting-up-web-tracking-by-sending-events-via-javascript-requests#main-page)

## 4. Web Push Subscription Configuration

### Purpose

* Store owners can quickly set up Web Push with minimal effort
* Subscribers are added to eSputnik with a token
* Rejected subscribers aren't added, but can be prompted again later
* Manual updates (e.g., icons, subscription types) are supported via configuration in the eSputnik account
* Store owners can configure сustom push campaigns via eSputnik
* CMS activity data powers reporting
* Conflicts with third-party push providers are handled gracefully

### Implementation

1. [Add a domain](https://docs.esputnik.com/reference/addwebpushdomain) for Web Push notifications.
2. [Receive](https://docs.esputnik.com/reference/getwebpushscript) the eSputnik Web Push script and service worker content.
3. Generate `sw.js` with the service worker content and upload it along with the script to the site.

> 📘 Note
>
> The API-based setup creates a one-click subscription by default. A user can change the subscription type in the eSputnik account settings

## 5. Product Feed Configuration

### Purpose

[The product feed](https://docs.esputnik.com/docs/importing-a-product-feed) allows eSputnik to access real-time catalog data from your CMS, enabling personalized product recommendations, dynamic content, and relevant campaign triggers.

> 📘 Note
>
> Having a feed is necessary for tracking web events

### Implementation

* [Post](https://docs.esputnik.com/reference/configureproductfeeds) product feed links (with language parameters) to eSputnik from your CMS
* Detect missing or incorrect feeds and notify the user
* Provide a simple interface for fixing feed errors or updating links
* Allow users to manage feed settings like update frequency and supported languages

## Plugin Uninstallation

When the plugin is uninstalled, remove all configurations it created — including installed scripts and markings on the transferred data — so that every subsequent installation starts from scratch, like the first one.

## Need Help?

If any step seems unclear or technically challenging, contact us at <support@esputnik.com> and use the chat in the bottom right corner of this page for direct support. We're happy to help you determine the best integration approach.