Shopify standard integration setup
This page walks you through how to integrate Braze with Shopify using our standard integration for users with a Shopify online store. If you use a Shopify headless site or are looking to implement more tailored solutions, refer to Shopify custom integration setup.
Step 1: Connect your Shopify store
- In Braze, go to Partner Integrations > Technology Partners and then search for “Shopify”.
If you’re using the older navigation, you can find Technology Partners under Integrations.
- On the Shopify partner page, select Begin setup to start the integration process.
- In the Shopify app store, install the Braze application.
If your Shopify account is associated with more than one store, you can change the store you’re logged into by selecting the store icon at the top-right of the page and selecting Switch stores.
- After installing the Braze app, you’ll be redirected to Braze to confirm the workspace you want to connect to Shopify. A Shopify store can connect to only one workspace. If you need to switch, select the correct workspace.
- Select Begin setup.
Step 2: Enable Braze Web SDKs
For Shopify online stores, you can select the standard setup to automatically implement the Braze Web SDK and JavaScript SDK.
After you select the standard setup onboarding path, you’ll need to choose when Braze should initialize and load the SDKs from one of the following options:
- Upon site visit, such as session start
- Tracks both identified and anonymous users
- Upon account signup, such as account login
- Track only identified users
- Starts tracking data when site visitors sign up or log into their accounts
Step 3: Configure your Shopify data
Standard data setup
Now you’ll select the Shopify data you want to track.
The following events will be enabled by default in the standard integration.
Braze recommended events | Shopify custom events | Shopify custom attributes |
---|---|---|
|
|
|
For more information on the data tracked through the integration, refer to Shopify Data Features.
Historical backfill setup
Through the standard setup, you have the option to perform an initial load of your Shopify customers and orders from the last 90 days prior to your Shopify integration connection. To do so, select the checkbox to include the initial data load as part of your integration.
This table contains the data that will be initially loaded through the backfill.
Braze recommended events | Shopify custom events | Braze standard attributes | Braze subscription statuses |
---|---|---|---|
|
|
|
|
As your Shopify customer records are loaded into Braze, the Shopify customer ID will be used as the Braze external ID.
If you’re an existing Braze customer with active campaigns or Canvases, review Shopify data features for more details.
(Advanced) Custom data tracking setup
With the Braze SDKs, you can track custom events or custom attributes that go beyond standard events for this integration. Custom events capture unique interactions in your store, such as:
Custom events | Custom attributes |
---|---|
|
|
Tracking custom data helps you gain deeper insights into user behavior and personalize their experience even further. To implement custom events, you need to edit your storefront’s theme code in the theme.liquid
file. You may need help from your developers.
For example, the following JavaScript snippet tracks if the current user subscribes to a newsletter, and logs that as a custom event on their profile in Braze:
1
2
3
4
5
6
7
8
9
braze.logCustomEvent(
“subscribed_to_newsletter”,
{
newsletterName: ‘News and Offers’,
customerEmail: ‘customer_1@gmail.com’,
sendOffers: true
}
);
The SDK must be initialized (listening for activity) on a user’s device to log events or custom attributes. To learn more about logging custom data, refer to User object and logCustomEvent object.
Step 4: Configure how you manage users
First, select your external_id
from the dropdown.
Using an email address or a hashed email address as your Braze external ID can help simplify identity management across your data sources. However, it’s important to consider the potential risks to user privacy and data security.
- Guessable Information: Email addresses are easily guessable, making them vulnerable to attacks.
- Risk of Exploitation: If a malicious user alters their web browser to send someone else’s email address as their external ID, they could potentially access sensitive messages or account information.
Second, you have the option to collect your email or SMS marketing opt-ins from Shopify.
If you use the email or SMS channels, you can sync your email and SMS marketing opt-in states into Braze. If you sync email marketing opt-ins from Shopify, Braze will automatically create an email subscription group for all users associated with that specific store. You need to create a unique name for this subscription group.
As mentioned in Shopify overview, if you want to use a third-party capture form, your developers need to integrate Braze SDK code. This will let you capture the email address and global email subscription status from form submissions. Specifically, you need to implement and test these methods to your theme.liquid
file:
- setEmail: Sets the email address on the user profile
- setEmailNotificationSubscriptionType: Updates the global email subscription status
Step 5: Sync products (optional)
You can sync all products from your Shopify store to a Braze catalog for deeper messaging personalization. Automatic updates occur in near real-time so your catalog always reflects the latest product details. To learn more, check out Shopify product sync.
Step 6: Activate Channels (optional)
You can enable in-app messages without using a developer by configuring them in your setup.
Supporting additional SDK channels
The Braze SDKs enable various messaging channels, including in-app messages and Content Cards.
Content Cards and Feature Flags
To add content cards or feature flags, you will need to collaborate with your developers to insert the necessary SDK code directly into your theme.liquid
file. For detailed instructions, refer to Integrating the Braze SDK.
Web push notifications
Web push currently isn’t supported for the Shopify integration. If you want to see this supported in the future, submit a product request through the Braze product portal.
If you wish to see this supported in the future, submit a product request through the Braze product portal.
Step 7: Finish setup
- After you configure your setup, select Finish Setup.
- Enable the Braze app embed within your Shopify theme settings. Select Open Shopify to be redirected to your Shopify account to enable the app embed within your store’s theme settings.
- After you enable the app embed, your setup is complete!
Confirm you can view your integration settings, the status of initial data sync, and your active Shopify events.