Перейти к содержимому

Shopify integration guide

The ExpertSender CDP Shopify plugin allows you to:

  • Send order information (including statuses) to ECDP.
  • Synchronize customer data (subscriptions use Shopify’s native integration).
  • Track website traffic using a data layer.
  • Map custom Shopify fields with custom attributes in ECDP.
  • Support multi-market stores.

Plugin configuration

API and website setup

  1. Go to Settings > API in your Shopify admin panel.
  2. Enter your API Key and Website ID.
    To find this information:
    • Log in to ExpertSender CDP.
    • Navigate to Settings > API in the ExpertSender platform to retrieve the API key.
    • To find your Website ID, go to Web Tracking in ExpertSender and find your website’s ID under the Websites tab.

Multi-market support
The plugin supports stores operating in multiple markets. You can configure market-specific options by selecting the appropriate market from the Market dropdown in the settings page.

Web tracking setup

To properly configure web tracking and handle data layer events in your Shopify store, follow these steps:

Tracking code

Step 1: Add the web tracking code

  1. In your Shopify admin panel, go to Settings > Web Tracking.
  2. Paste the ECDP web tracking code provided by ExpertSender into the main section of the Web Tracking settings.
    To find the script:
    • Log in to ExpertSender CDP.
    • Navigate to Settings > Web Tracking.
    • Select your website and copy the web tracking script.
  3. Save the settings.

Step 2: Activate web tracking in theme settings

  1. Go to Online Stores > Themes > Customize.
  2. In App embeds, locate and activate the ECDP Web Tracking app embed to ensure the tracking script is applied to your store’s theme.

Handling the data layer for event tracking

After setting up the web tracking script, you can now enable additional event tracking (like the «add_to_cart» event):

  1. Go to Settings > Customer events > Add custom pixel.
  2. Name the pixel «expertsender-cdp».
  3. Copy the pixel code from the main settings page by clicking the «Copy code» button.
  4. Return to Settings > Web Tracking and paste the pixel code into the appropriate field.
  5. Save the settings to ensure the pixel is properly configured for event tracking.

This will enable tracking of additional dataLayer events required for web traffic monitoring.

Multi-variant product tracking (handling «select_item» event)

If your store sells products with multiple variants (e.g., different sizes or colors), you will need to configure additional tracking for the «select_item» event.

  1. Go to Online Stores > Themes > Customize > App embeds > ECDP Web Tracking.
  2. Fill in the required CSS selectors for variant selection, including:
    • Variant option input selector: The dropdown or radio button where customers choose the product variant.Product title selector: The product name selector.Product image selector: The product image selector that updates with the selected variant.Variant regular price selector: The price field selector for the regular price.Variant sale price selector: The selector for the discounted price (if applicable).
    To find a CSS selector:
    • Right-click on the element in your Shopify store, click Inspect, and copy the unique selector path for that element.

Example set of data:

FieldValue
Variant option input selector.product-form__input input
Product title selectordiv.product__title h1
Product image selector.product__media-item—variant.is-active .product__media img
Variant regular price selector.product__info-container .price-item—sale
Variant sale price selector.product__info-container .price-item—sale
Price thousands separator.
Price decimal separator,

Customer data configuration

The Customer data section on the main settings page allows you to configure how customer data, particularly phone numbers and consents, is collected and sent to ExpertSender CDP. Follow the instructions below to complete this setup:

Address from which customer phone number is collected

  • Billing address: By default, the customer’s phone number will be collected from the Billing address in Shopify.
  • If you want to collect the phone number from the Shipping address instead, select that option from the dropdown.

To ensure that customer consents (for email and SMS marketing) are properly sent to ECDP, you need to configure the consent IDs in this section. These consents correspond to those created in the ExpertSender CDP platform.

  • ECDP consent ID for email:
    By default, this field is set to 1, which stands for the email consent ID in ECDP.
    If you have created custom consents in ECDP, you will need to update this field with the correct consent ID for email.
  • ECDP consent ID for SMS:
    By default, this field is set to 2, which represents the SMS consent ID in ECDP.
    As with email consent, if you are using custom consents in ECDP, make sure to input the correct consent ID for SMS.

If you’ve created custom consents in ExpertSender CDP, follow these steps to retrieve the appropriate consent IDs:

  1. Log in to your ExpertSender CDP account.
  2. Navigate to Settings > Consents.
  3. Locate the consents you’ve created, and copy the corresponding IDs.
  4. Paste the correct consent IDs into the Email and SMS fields on your Shopify plugin settings page.

Exporting historical orders and customers

At the beginning of your cooperation with ExpertSender, it’s recommended to export any historical orders or customer data from your Shopify store to ExpertSender CDP. This allows you to start your marketing campaigns with full data.

  1. Go to the Main settings page in the plugin.
  2. In the Export data section, you can choose to:
    • Export data from a specific time period.
    • Export all historical data (orders or customers).

This export can be done manually at the start, ensuring that all relevant data is synced with ExpertSender CDP for further marketing automation.

Custom field mapping

The plugin allows you to map custom Shopify fields to corresponding attributes in ExpertSender CDP.

  1. Go to Custom field mapping
    • Navigate to Settings > Custom field mapping.
    • Select which Shopify fields (related to orders, products, or customers) you want to sync with custom fields in ECDP.
    • Ensure that the fields in ECDP are created beforehand to facilitate proper mapping.

Synchronizing orders and customers

  • Order information: Order information (including statuses) is sent to ECDP automatically without any additional setup.
  • Customer information: Customer data is synchronized automatically using Shopify’s native integration with ECDP. This includes subscription information, so no extra steps are required.