virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
integrations / shopify for digital products

Shopify digital products revenue tracking

To track revenue from digital products on Shopify by channel, store a visitor ID on the cart, let Shopify copy it onto the order as a note attribute, and join each order to the visits before it. Virling does this for stores that sell downloads, presets, templates or courses, so you see which post, newsletter or search brought each sale. Refunds are taken off, and orders that match no visit show as Unattributed. Open source under AGPL, hosted or self-hosted.

Start free See the demo

A digital product often sells from one page: someone reads a post about your preset pack, opens the product page and pays. Virling ties that order to the visit through the visitor ID a theme snippet stores on the cart, which Shopify copies onto the order as the virling_vid note attribute; UTM tags Shopify keeps on the order are not read, and what Shopify itself shows is in Shopify UTM tracking. The matching rules are in the Shopify docs.

What you get

  • Each download sale credited to a channel. Every order goes to one visit and its channel, source, campaign and landing page, so you see whether the pack sold from a video description, a newsletter or a search. How the visit is picked is in Model and lookback window.
  • Revenue per source, campaign and landing page. The dashboard lists visitors, revenue and revenue per visitor for each, so a post that sent many visitors and no sales stands apart from a small one that paid.
  • Posts and newsletters measured by sales. Share a tracked link or a link with UTM tags in each post, newsletter or bio, pointing at your product page, and the Campaign tab and Links show the revenue each one brought.

Set it up

Connect the store with the Admin API token of a custom app that has only the read_orders scope, and add the theme snippet that stores the visitor ID on the cart, both shown step by step in the Shopify docs. Leave cookieless mode off, since without the cookie there is no visitor ID for the cart to carry, and test each checkout button you sell downloads with, as below.

Buy now buttons and accelerated checkouts

Buyers of a single download often skip the cart with Buy it now or an accelerated checkout such as Shop Pay. Virling does not look at how the order was paid, only at whether its note attributes include virling_vid. The snippet writes it to the cart, so a button that skips the cart may leave it out, and Virling does not handle that case separately. Check each button you use:

  1. Put Shopify Payments in test mode or turn on the Bogus Gateway.
  2. Open a private window, visit your store through a tagged link such as https://yourstore.com/?utm_source=test&utm_medium=email, and place a test order with the button. Use a new customer email for each test.
  3. Open the order in your Shopify admin and look for virling_vid in its note attributes, shown as additional details.
  4. Wait a minute or two for the next sync. The payment shows the test source and the Email channel instead of Unattributed.

If a button leaves the ID out, its orders can still match by email. When your site sent the buyer's email as an identify event, for example at a newsletter signup, an order with no visitor ID and exactly that email is credited to that visitor and shows Matched by email. It only applies to orders synced after the identify. See Unattributed revenue.

Digital delivery apps

Most stores send the file with a delivery app that acts on the paid order. Virling reads the order through the Admin API, not the delivery, so it works the same whichever app sends the file, and the email with the download link plays no part in the credit. If an app sells through its own checkout instead of Shopify's, those sales are not Shopify orders and Virling does not see them.

Bundles

Virling reads an order's total, not its line items, so a bundle of five templates is one order and one payment, credited to one channel, whether it is built with a bundle app or sold as its own product. A buyer who puts two downloads in the same cart also makes one order. To compare a bundle with single products, give each its own tracked link and read them by campaign and landing page.

A second purchase by the same customer

Download buyers often come back for the next pack. A later order by the same Shopify customer keeps the channel of that customer's first order, so if Social sold the first pack, the newsletter that sold the second does not get it. An order that Shopify returns without a customer stands alone and is credited from its own visit.

An example, with made-up numbers

These numbers are invented to show the arithmetic. A store sells a preset pack for $20, and 2 of the Social orders were refunded in full:

ChannelVisitorsOrdersRevenueRevenue per visitor
Social2,00020$360$0.18
Email40016$320$0.80
Unattributed4$80

Social earned more in total, but a visitor from Email was worth over four times as much. The 4 Unattributed orders count toward the $760 of revenue and toward no channel. To see what a sale leaves after Shopify's fees, use the Shopify fee calculator.

Refunds on downloads

A refunded download has usually been downloaded already, so it is worth knowing which channel the refunds come from. A full or partial refund lowers its order's revenue on the day of the purchase, not of the refund, and shows within a minute or two, so a channel whose buyers ask for their money back drops on the days they bought. A voided order counts as failed, a canceled order that was paid counts until it is refunded, and chargebacks are not read.

What stays Unattributed

  • Orders placed before the snippet was in your theme, unless their email matches. The first import goes back 60 days.
  • Orders from carts made outside your storefront: cart permalinks, Buy Button embeds and other sales channels. Link to the product page instead of a cart permalink.
  • Orders where the script was blocked or cookieless, or where a button skipped the cart and left the ID out.
  • Orders with a visitor ID but no visit of that visitor inside the lookback window.

All of them still count toward revenue. Orders without a visitor ID can match by email, as above.

What to know

  • An order counts once Shopify marks it paid. Pending and authorized orders wait, and voided ones count as failed.
  • Free downloads, orders with a total of 0, are not imported, so a free lead magnet does not show as an order.
  • Virling does not read which product an order was for or how it was delivered.

Frequently asked questions

How do I track Shopify digital product revenue by channel?

Give Virling a Shopify token that can only read orders, and add the theme snippet that puts the visitor ID on the cart. Each paid download order is then credited to a visit before it, with its channel, source, campaign and landing page.

Does Buy it now or Shop Pay keep the visitor ID?

It depends on whether the order's note attributes include virling_vid. The snippet writes it to the cart, so a button that skips the cart may leave it out, and Virling does not handle that case separately. Place a test order with each button you use and check its note attributes.

Are refunds on Shopify downloads taken off?

Yes. A refunded download lowers the revenue of the order it came from, dated on the day of the purchase, within a minute or two of the refund. Chargebacks are not read.

Why are some Shopify download orders Unattributed?

Usually because the order's note attributes have no virling_vid: the snippet was missing, the script was blocked or cookieless, or the order came from a cart permalink, a Buy Button or another sales channel. An order is also Unattributed when no visit of that visitor falls inside the lookback window. It still counts toward revenue.

Which channel gets a second purchase by the same customer?

The channel of that customer's first order. Orders are tied together by the Shopify customer, so an order that Shopify returns without a customer counts as its own customer.

Does my digital delivery app change how orders are tracked?

No. The delivery app sends the file after Shopify creates the order, and Virling reads the order and its note attributes, not the delivery, so any app works. An app that sells through its own checkout instead of Shopify's makes no Shopify order, and Virling does not see those sales.

Can Virling show revenue for each product in my Shopify store?

No. Virling does not read which product an order was for. Give each product its own tracked links and compare them by campaign and landing page.

Full guides: Shopify in the docs, Model and lookback window and Tracked links.

Start free