Shopify
SegMetrics offers direct integration with Shopify to track revenue, refunds, coupons, and customer journeys. This comprehensive integration combines order data import with web tracking to provide complete attribution analysis from first touch to purchase and beyond.
Note: This integration does not provide tag dates. SegMetrics will record the date a tag was first seen rather than the date it was originally applied.
Check out this video to learn more about the benefits of connecting Shopify to SegMetrics:
Watch this video for a walk through on how to connect your Shopify account to SegMetrics or read below for a step by step.
Integration Overview
The Shopify integration provides two complementary tracking capabilities:
- Revenue Integration: Direct API connection imports all order data, customer information, refunds, and transaction details
- Web Tracking: Tracking pixel captures visitor behavior, traffic sources, and attribution data
When combined, these create complete customer journey visibility from initial website visit through purchase and beyond.
Step 1: Connect Shopify Integration
Set up the direct API connection to import order data:
-
Navigate to the Shopify integration page in SegMetrics
Enter your Shopify store details:
- Store Name: Use the original name you gave your Shopify store when first created
- Store URL: Your complete Shopify store domain
- Click Connect Shopify to authorize the integration
- Complete the OAuth authorization process
Important: If you use a custom domain, your store name is still the original Shopify store name from account creation, not your custom domain.
Once connected, SegMetrics will automatically import all historical Shopify data including orders, customers, products, and transaction history.

Step 2: Install Web Tracking on Your Shop
Add the SegMetrics tracking pixel to capture visitor behavior and enable attribution:
Get Your Tracking Code
- In SegMetrics, navigate to Site Setup from the gear menu
- Copy your tracking pixel code
Install the SegMetrics Tracking Code on Your Shop
- In your Shopify admin, click Online store, and then click Themes
- In the theme drop-down, click Edit Code
- Copy the Tracking Code pixel from SegMetrics
- In your Shopify admin, open your
theme.liquidfile - Paste the code pixel as low in the
<head>of thetheme.liquidcode as possible - In your Shopify admin, click Save
Step 3: Install the Checkout Code
Configure checkout tracking to ensure accurate attribution of purchases to marketing campaigns:
- From your Shopify admin, go to Settings > Customer Events
- Click Add custom pixel in the top right
- Name your pixel SegMetrics and click Add pixel
- Clear the contents of the Code field and copy/paste the following code exactly. This field should not contain any HTML, unlike the pixel code installed in your Liquid theme:
document.addEventListener('segtrk.ready', function(e) {
SegMet.Integrations.shopify(analytics);
});
var _segq = _segq || [];
var _segs = _segs || {};
(function () {var dc = document.createElement('script');dc.type = 'text/javascript';dc.async = true;dc.src = '//tag.segmetrics.io/{{ACCOUNT-ID-PLACEHOLDER}}.js';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(dc,s);})();
- Save your code
- Click Connect
- Confirm this action by pressing Connect again
How to Use Shopify Data in SegMetrics
Report Types Available
- Acquisition Reports - NEW customers only
- Nurture Reports - Customers who received tags/list additions
- Engagement Reports - Customers who interacted with website
- Orders Reports - ALL revenue regardless of customer status
- Subscriptions Reports - Customers who started subscriptions
Key Benefits
- Complete Attribution: Track customer journeys from first website visit through purchase
- Revenue Analysis: Analyze performance by product, collection, discount codes, and customer segments
- Refund Tracking: Monitor returns and their impact on campaign ROI
- Cross-Platform Integration: Combine Shopify data with email marketing, ads, and CRM data
- Lifetime Value: Track customer value over time including repeat purchases
Understanding Refund Reporting
SegMetrics and Shopify handle refund reporting differently, which may cause apparent discrepancies:
Shopify Refund Definition: Total returns processed during the selected time period, regardless of when the original purchase occurred.
SegMetrics Refund Definition: Refunds are attributed back to the original order date, not the refund processing date.
Example Scenario:
- Order placed: January 15
- Refund processed: February 10
- February report in Shopify: Shows the refund
- February report in SegMetrics: Does not show the refund (attributed to January)
To view refunds in SegMetrics:
- Go to Orders Report
- Add Order Status filter
- Set filter to "has been refunded"
- Ensure your date range includes the original order dates
[Image placeholder: Screenshot of SegMetrics Orders Report showing Order Status filter set to "has been refunded" with sample refund data]
Frequently Asked Questions
Q: Does the integration import historical data?
A: Yes, when you first connect Shopify, SegMetrics automatically imports all historical order data, customers, and transaction details.
Q: How quickly do new orders appear in SegMetrics?
A: New orders typically appear during the next import cycle. Pending on your plan it could be anywhere from 6-10 hours of being placed in Shopify through the real-time API connection.
Q: Do I need to install tracking on both my theme and checkout?
A: Yes, both installations are required. The theme tracking captures website visitor behavior, while the checkout code ensures proper attribution of purchases to marketing campaigns.
Q: What about subscription products and recurring orders?
A: The integration captures all subscription orders and recurring payments. SegMetrics categorizes these appropriately in the Subscriptions reports.
Q: Do I need different setup for multiple Shopify stores?
A: Yes, each Shopify store requires its own integration setup in SegMetrics. You can connect multiple stores to the same SegMetrics account.
Q: What happens if I change my Shopify theme?
A: You'll need to reinstall the tracking pixel in your new theme's theme.liquid file. The Customer Events pixel will remain active across theme changes.
Transcription:
Ready to see exactly where your Shopify customers are coming from and which marketing channels are driving revenue. Let's connect your Shopify Store to SegMetrics.
There are two parts to connecting the integration and installing your tracking pixels.
This will take a few minutes, but I'll walk you through every step from your SegMetris account.
Start by clicking the Gear icon, then open up your Integrations.
Find the Shopify integration and click on it.
You'll be asked for your Shopify Store URL.
Your Shopify Store URL can be located in the address bar when inside your store admin, enter that in and click Connect.
Shopify will open and ask you to install the SegMetrics app.
Click Install to confirm.
Once connected, SegMetrics will automatically pull in your historical Shopify data, your orders, products, coupon codes, and more. That import runs in the background, so let's keep moving and get your tracking pixels installed.
Now head over to your site setup page and click View Your Setup Instructions.
You'll see your SegMetrics tracking pixel.
Go ahead and copy that.
Jump back over to your Shopify admin and click Online Store.
In the left sidebar, click the three dots next to your active theme and select Edit Code.
Don't worry, we're just going to make one small addition here.
Under the Layout folder, open the file called theme.liquid.
Now search for the closing Head tag. It looks like this.
Paste your SegMetrics tracking pixel directly above that tag.
Then click Save.
Great.
Now head back over to your SegMetrics setup instructions.
This time, scroll down to the Shopify section and copy the second tracking pixel.
This one is specifically for tracking your checkout page, so it's important to install both.
Head back over to your Shopify admin home screen and click Settings.
In the lower left corner, navigate to the customer events, then click More Views and select Custom Pixels.
Click Add Custom Pixel and name it SegMetrics so it's easy to find later.
Paste your tracking pixel into the code area, click Save, and then click Connect.
And that's it. You're all set.
SegMetrics is now tracking your Shopify visitors, leads and orders end to end.
Give it a little time for data to come in, and you'll start seeing exactly which marketing channels are bringing in your most valuable customers.
Full Transcription:
Hey there! So you're running your store on Shopify. Awesome. Your product pages look great, your discount codes are doing their thing, and the orders are rolling in. But here's a question: do you actually know where your best customers are coming from? Which ads, emails, or channels brought in the shoppers who added that extra item to their cart, came back for a second order, and turned into loyal repeat buyers? If that's a little blurry, stick around. Today I'm going to show you how connecting Shopify to SegMetrics ties every sale back to the marketing that made it happen.
Shopify is a fantastic platform for selling online. Beautiful storefronts, a smooth checkout, discount codes, and a massive app ecosystem. It handles all of that really well.
But here's the catch: Shopify is great at telling you what sold. It's not so great at telling you why it sold. You can see revenue, orders, and which products are moving, but it's tough to see which Facebook ad, YouTube video, or email sequence actually brought that buyer to your store in the first place. And if someone joined your list six months before they bought? That connection is basically gone.
That's a big blind spot when you're deciding where to put your ad budget. You might be pouring money into a channel that brings in lots of one-time, discount-hunting buyers while totally underfunding the one that brings in your high-LTV repeat customers.
That's exactly where SegMetrics comes in. When you connect Shopify to SegMetrics, you combine all of your store data with SegMetrics' full-funnel attribution engine. Now every dollar has a story, from first click all the way to checkout and beyond.
Alright, let's jump into SegMetrics and I'll show you how this works.
Connecting Shopify is easy. Head over to the Integrations page, find Shopify, and connect your store. Just like that, your orders, products, customers, and refunds start flowing into SegMetrics automatically.
Let's open up the Orders Dashboard and scroll down to the Top Order Sources widget. This is where attribution really comes to life. It connects every Shopify sale back to the channel that brought that buyer in, like Paid, Direct, Email, AI Search, or Social, along with the orders and revenue for each one.
In this example, Paid is the clear winner by volume. But look closer: Email, Ai Search and Social brought in a good chunk of change combined. You'd totally miss that looking at your Shopify sales numbers alone.
Flip over to Referrer to see the exact sites sending you buyers, or use the Other dropdown to break it down by UTM source or campaign. You can also switch your attribution model on the fly. First touch shows you which channel started the relationship. Last touch shows you what closed the sale. And SegMetrics tracks all of this even if someone opted in months before they ever hit your checkout.
Now, since Paid is doing the heavy lifting here, let's head over to the Advertising Dashboard to see which ads are actually worth the money. The Top Sources widget lines up every campaign side by side, with its spend, clicks, leads, customers, revenue, cost per lead, customer acquisition cost, and return on ad spend.
Check this out. All four of these campaigns have almost the same cost per click, around fifty or sixty cents. If you only looked inside your ad platforms, they'd seem pretty even. But the revenue tells a totally different story. Our Facebook Retargeting campaign spent less than the Webinar campaign, yet brought in nearly four times the revenue, at a 270% return on ad spend. Meanwhile, the Webinar campaign is our biggest spender with the lowest return.
Now, before you pull the plug on that webinar, switch to first-touch attribution. It might be the campaign filling your retargeting audience in the first place. You can also drill down from Campaign to Ad Set or even individual Ad to find the exact creative driving sales.
From there, the Top Products and Product Orbit widgets show you what's selling and which products people buy together. That's perfect for planning your bundles, cross-sells, and post-purchase offers.
With Shopify and SegMetrics working together, you're not just tracking sales. You're understanding them. You'll know which channels bring in your most valuable customers, which products naturally fit together, and where refunds are sneaking in. That means you can double down on what's actually driving profit and stop spending money on what isn't.
That wraps things up for this episode. We've got a lot more videos on the channel and new episodes coming to help you optimize your marketing with SegMetrics. Don't forget to like and subscribe below. Thanks for watching. See you next time.