Przejdź do treści

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 Script#

Step 1: Add the Web Tracking Code#

  1. In your Shopify admin panel, go to Settings -> Web Tracking.
  2. Paste the ECDP web tracking script 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 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.

Na tej stronie
Do góry