How I Set Up Klaviyo for a Multi-Storefront BigCommerce Store
How I Set Up Klaviyo for a Multi-Storefront BigCommerce Store
If you’re running a BigCommerce store with multiple storefronts and want to use Klaviyo, you’ll quickly find that it’s not exactly plug-and-play. After working through a few quirks and testing some workarounds, I’ve landed on a setup that works pretty well, and I’m sharing the steps here in case you’re navigating the same thing.
Step 1: Stick with One Klaviyo Account
You don’t need to create a separate Klaviyo account for each storefront. Klaviyo connects to BigCommerce using your main store’s account URL, not the individual domain names for each storefront.
Step 2: Native Integration for Your Main Storefront Only
For the primary storefront, go ahead and use the native Klaviyo-BigCommerce integration. In the integration settings, set email signups to go to a general list (I just named mine “EMAIL”) and SMS to a general “SMS” list.
For the secondary storefront(s), you’ll need to add Klaviyo’s JavaScript manually. I used BigCommerce’s Script Manager:
- Location: Footer
- Pages: All Pages
- Category: Essential
- Type: URL
- Load Method: Async
This makes sure Klaviyo is still tracking properly across both websites.
Step 3: Use Flows to Segment the Main List by Storefront
- Set up storefront-specific lists.
These will replace the generic “EMAIL” and “SMS” lists once users enter your funnel. - Create a signup form for each storefront’s footer.
You don’t need anything fancy here, just a simple form for each of the storefront lists. - Build a flow to sort leads into the correct list.
- Trigger: When someone is added to the generic “EMAIL” list
- Filters: Use
BigCommerce Origin Channel = [Your Storefront Channel ID] - If you’re not sure where to find your storefront’s Channel ID, you can usually pull this from a user profile in Klaviyo after a signup or order comes through.
- “Started Checkout at least once in last 30 days” where the channel matches
- Or
$sourcecontains your footer form name (e.g., “Storefront Footer Form”)
Step 4: Create Targeted Popups for Each Storefront
Now it’s time to go a bit more advanced.
- Create separate popup signup forms for each storefront
- Have them send to each of the storefront lists (not the shared “EMAIL” list)
- Under Targeting > URLs, make sure each form is set to display only on the domain it belongs to. This way, Storefront A won’t show a popup intended for Storefront B.
Optional: Add Storefront Tags in the Theme Files
To keep track of which storefront a customer is shopping on, edit your theme files to include a storefront reference in the Klaviyo event tracking code.
For example, in your secondary storefront’s theme, go to:templates/pages/product.html
Then update the “Viewed Product” script to include a Storefront field, like this: (be sure to update the “StorefrontName.com” to your URL)
<script type="text/javascript">
var _learnq = _learnq || [];
var product_categories = [];
{{#each product.category}}
product_categories.push('{{this}}');
{{/each}}
var item = {
Name: "{{product.title}}",
ProductID: "{{product.id}}",
ImageURL: "{{getImage product.main_image 'product_size' (cdn theme_settings.default_image_product)}}",
URL: "{{product.url}}",
Brand: "{{product.brand.name}}",
Categories: product_categories,
Price: "{{product.price.without_tax.value}}",
CompareAtPrice: "{{product.price.rrp_without_tax.value}}",
Storefront: "StorefrontName.com"
};
_learnq.push(['track', 'Viewed Product', item]);
_learnq.push(['trackViewedItem', {
Title: item.Name,
ItemId: item.ProductID,
Categories: item.Categories,
ImageUrl: item.ImageURL,
Url: item.URL,
Metadata: {
Brand: item.Brand,
Price: item.Price,
CompareAtPrice: item.CompareAtPrice
}
}]);
</script>
This should allow you to segment flows related to products by storefront.
Final Thoughts
It’s not perfect out of the box, but with a few tweaks, Klaviyo can work well across multiple BigCommerce storefronts. The key is to plan how you’ll segment and filter users early, and then build your logic around it. While I’ve found using the storefront tags helpful, i’m still struggling to get them to work properly in the browse abandonment or checkout abandonment flows. I will update this later if I’ve found a proper solution for that.