Shopify attribution app: a buyer's checklist
By Devendra Variya, co-founder of Virling. Published 2026-11-21.
A Shopify attribution app links each order to the visit that brought the buyer, so you see revenue per channel and campaign. Before you pick one, check seven things: that it shows the source of every single order, lets you choose first or last touch, is clear about discount codes, handles other devices and checkout redirects, respects privacy and cookie rules, lets you own the data, and has a price that fits your store. Below is what to ask for each, how Virling answers it, and where Virling falls short.
1. Order-level source
What to check: a report of sales per channel is not enough. You want to open any order and see the visits before it, so you can trust the totals and find orders with no source.
Virling: the Payments page lists every order with the channel it was credited to; open one to see the visits before it, and filter by unattributed to find orders with no visitor. A short snippet in theme.liquid stores the visitor ID on the cart as virling_vid, and Shopify copies it onto the order as a note attribute. Virling reads orders with a read-only token (only the read_orders scope), imports the last 60 days on the first run, then new orders and refunds every minute. Refunds lower a channel's revenue, and Shopify Subscriptions renewals keep the channel of the first payment. Headless and Hydrogen stores work too, with the cart attribute set from your own cart code; see Shopify Hydrogen UTM tracking. Setup is on the Shopify integration page.
2. First and last touch
What to check: which visit gets the credit when a buyer came more than once, whether you can change it, and how far back it looks.
Virling: each site has one model: last non-direct (the default), first touch or last touch, with a lookback window of 30, 60, 90 or 365 days. Changing either rebuilds attribution for every order, history included. Linear and position-based models are not available yet. To pick one, see the models and windows in ecommerce attribution.
3. Discount codes
What to check: whether the app credits sales by the code used or by the visit, and what happens when a code leaks to a coupon site and credits sales its owner did not drive.
Virling: an order is credited by the visit before it, not by a discount code. Virling does not read codes, so code redemptions stay in Shopify's reports. Give each creator or campaign a tagged link as well as a code, and compare the two; discount code attribution covers how.
4. Cross-device and redirects
What to check: what happens when someone browses on a phone and buys on a laptop, and whether the source survives a redirect to checkout or between your domains.
Virling: the visitor ID lives in a first-party cookie in one browser, so two devices are two visitors. For an order with no visitor ID, Virling compares the order's email with emails your site sent as identify events, kept only as salted hashes, and an exact match credits that visitor and shows Matched by email. Shopify's checkout domain is no problem, because the visitor ID travels on the cart, not in the browser. Subdomains share the cookie, but two separate domains do not, so keep landing pages and the store on one domain or its subdomains. Carts made outside your storefront, such as cart permalinks, Buy Button embeds or other sales channels, carry no visitor ID and can only match by email. Untagged links and missing visitor IDs are the usual reasons orders land in Direct; see why Shopify orders show up as Direct.
5. Privacy and cookies
What to check: what the app stores about each visitor, which cookies it sets, and how it works with a consent banner.
Virling: events do not include IP addresses, full user agents, full referrer URLs or anything a visitor types. The one cookie, virling_vid, is first-party and holds a random ID. With data-respect-gpc the script sends nothing when Global Privacy Control is on. A cookieless mode sets no cookie at all, but then orders cannot be linked to visits, so leave it off for a store; the Until consent setting counts visits without the cookie and sets it only once the visitor accepts.
6. Data ownership
What to check: where your order and visit data lives, what access the app needs to your store, and what happens if you stop paying.
Virling: it is open source under AGPL. Self-host it and every visit and order stays on your own server, in files you back up yourself. The Shopify token can only read orders, and Virling never creates, changes or refunds anything.
7. Price
What to check: the monthly price at your traffic, whether features are held back on cheaper plans, and whether there is a trial.
Virling: self-hosting is free, with every feature. Hosted plans start at $19 a month for unlimited sites and 100,000 events a month, after a 14-day free trial; see pricing. To see what an order leaves after Shopify's own fees, use the Shopify fee calculator.
An example: five orders side by side
Example data, made up to show the method: five orders from one imaginary store, with the source Shopify shows on each order and the visit source Virling joins to it under the default last non-direct model.
| Order | Total | Source in Shopify | Visit source in Virling | Why |
|---|---|---|---|---|
| #1041 | $64.00 | Direct | Clicked a newsletter link five days earlier, then came back by typing the URL | |
| #1042 | $38.50 | Search | Organic search | One visit from a search result, both agree |
| #1043 | $112.00 | Social | Social | One visit from an Instagram post, both agree |
| #1044 | $89.50 | Direct | Communities, matched by email | Found the store on a forum on a phone, signed up for restock alerts, bought later on a laptop |
| #1045 | $28.00 | Unknown | Unattributed | Cart permalink with no virling_vid and no email match |
The five orders total $332.00. Shopify shows $153.50 as Direct; Virling credits that money to Email and Communities instead. The two agree on $150.50, and $28.00 has no source in either, which leaves the same $332.00. Orders like #1045 are the ones to look into first.
What Virling does not do
- It does not import ad spend, so cost per order and return on ad spend come from your ad platform's numbers
- It does not read discount codes
- It does not read the UTM tags or landing page Shopify stores on an order; an order needs
virling_vidor an email match - It does not read Shopify subscription status, so retention uses payment recency
- Linear and position-based models are not available yet
- The first import goes back 60 days, the most Shopify gives without the extra
read_all_orderspermission
The steps for a whole store, including WooCommerce, are on the ecommerce page. If your store runs on WooCommerce, use the WooCommerce attribution plugin checklist. Self-host Virling free, or start the hosted version with a 14-day free trial.
Frequently asked questions
What does a Shopify attribution app do?
It records where each visitor came from, such as a search, an ad, an email or a social post, and links that visit to the order the visitor later placed, so you see revenue per channel and campaign.
What should I look for in a Shopify attribution app?
Check that it shows the source of every single order, lets you choose first or last touch, is clear about discount codes, handles other devices and checkout redirects, respects privacy and cookie rules, lets you own the data, and has a price that fits your store.
Does Virling read Shopify discount codes?
No. Virling credits an order by the visit before it, not by a discount code, so code redemptions stay in Shopify's reports. Give each creator or campaign a tagged link as well as a code and compare the two.
Does Virling import ad spend?
No. Virling shows revenue per channel and campaign, but it does not import ad spend, so cost per order and return on ad spend come from your ad platform's numbers.
Can I self-host a Shopify attribution app?
Virling is open source under AGPL and free to self-host with every feature, so orders and visits stay on your own server. There is also a hosted version with a 14-day free trial.
See the source of every Shopify order
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.