Attribution

How to know which blog post made a sale

Ownlytics team · · 6 min read

To know which blog post made a sale, you have to connect two records that normally live in different places: the visit (which pages someone read) and the payment (who paid). Once both carry the same visitor id, each sale can be credited to the post the buyer landed on, and you can rank posts by money instead of by page views.

yourapp.comToday7d30d9 online
Visitors3,619+42.1%
Revenue$2,226+67.0%
Conversion0.41%+8.4%
Revenue/visitor$0.11+17.6%
1.4k7000
PageVisitorsSalesRevenue
G/blog/setup-guide1,8005$245
G/blog/pricing-compared6403$147
Y/blog/show-hn-notes2,1001$49
X/blog/launch-recap3,2001$49
N/blog/weekly-changelog9000$0

Fig.Revenue by post: traffic and money rank differently. Sample data, not a real site.

Why page views don't answer this

Your analytics knows that 4,000 people read an article. Your payment processor knows that 12 people paid. Neither knows whether those 12 were among the 4,000.

The gap is the checkout. A buyer reads a post, clicks through to a payment page on another domain, pays, and the processor records a customer with an email address and an amount. The post, the search term and the referrer stay behind in the analytics tool. Unless something carries an identifier across that jump, the link is lost.

This is why a post with modest traffic can quietly be your best earner, and a post with a huge audience can earn nothing. You can't see either without joining the two records.

The three ways a sale finds its visit

In Ownlytics, the tracking script gives each visitor a first-party id on your domain. A sale is credited to a visit when that id reaches the payment. It gets there in one of three ways, covered in the revenue docs:

  1. Tagged payment links. The script adds the id to payment links on your pages automatically. Nothing to configure.
  2. Checkout metadata. If your server creates the checkout, you pass the visitor and session ids as metadata.
  3. Success page. When the buyer lands back on your site with the provider's checkout id in the URL, the script links the payment to the visit.

The mechanics differ by provider, but the idea is the same everywhere: put the id on the payment, then read it back. If you use Stripe, the Stripe attribution guide shows each checkout type.

Which post gets the credit?

A buyer rarely buys on the first visit. They might read three posts over two weeks. So you have to choose a rule, and the choice changes your answer.

ModelCreditsGood for
Last non-direct (default in Ownlytics)The most recent visit with a real sourceFinding what closes sales
First touchThe visitor's very first visitFinding what introduces you
Last touchThe visit right before buyingSeeing the final step, including Direct

Run the same month through two models and compare. If your top post under first touch is different from your top post under last touch, you have found two different jobs: one article that attracts, another that convinces. We go deeper on choosing in first touch vs last touch for solo founders.

V
Visitor 4821First seen 12 days ago · India · desktop
  1. Read “Setup guide”x.comNov 1 · 3 min on page
  2. Came back from a newsletternewsletterNov 6 · read pricing
  3. Opened checkoutNov 12 · 14:02
  4. Paid $49Dodo PaymentsCredited to the newsletter visit (last non-direct)

Fig.One buyer’s path, from first read to payment. Sample data, not a real site.

Example (made-up numbers for illustration)

Say you published four posts and sold 10 units at $49 in a month. This table is invented, but it shows what the join reveals.

PostVisitorsSalesRevenueRevenue per visitor
"Setup guide"1,8005$245$0.14
"Launch recap"3,2001$49$0.02
"Comparison for freelancers"6003$147$0.25
"Weekly notes"9001$49$0.05

By traffic, the launch recap wins. By money, it ties for last. The short comparison post, with a fifth of the audience, earns more than ten times as much per visitor. That is the decision you can only make with the join. We explain the metric in revenue per visitor.

A checklist you can run this week

  1. Pick the one payment provider that handles most of your sales and connect it to your analytics.
  2. Check how buyers reach checkout. Payment links on your site are tagged by the script. Server-created checkouts need the metadata change.
  3. Make a test purchase if your provider has a test mode, and confirm the sale shows a source and landing page.
  4. Choose an attribution model and write it down, so month-to-month comparisons stay fair.
  5. After 30 days, sort pages by revenue, not visits. Note the top three and the bottom three.
  6. For the top three, ask what the buyer wanted when they read it, and write the next post for that need.

What if the sale has no visitor attached?

It happens: a buyer pays on a phone after reading on a laptop, or clears cookies. Ownlytics tries in order the visitor id in the checkout metadata, the thank-you page, an email you passed through identify, and as a last resort checkout timing. Timing is a narrow last resort, for example when exactly one visitor clicked a checkout link in the three hours before the sale, and those matches are marked as estimated. Otherwise the sale stays unattributed, with a note saying why. Details are in sources and attribution.

An honest unattributed bucket is better than a guessed one. If it is large, fix the checkout wiring before trusting any ranking.

When this isn't worth doing

If you make fewer than a handful of sales a month, per-post numbers are noise. One purchase can flip your "best post". At that volume, read the individual sales and the pages those buyers saw, rather than ranking. Also, this only tells you where the buyer last arrived from, not why they chose you. Pair it with a question on your checkout or an email to new customers.

Try it on your own data

If you want to see how a post-level revenue view looks before setting anything up, the live demo shows a sample site.

FAQ

Can Google Analytics tell me which post led to a sale?

It can if purchase events reach it with the right identifiers, which takes setup on your side. The GA4 revenue attribution page covers how that approach compares.

Does the post need to be the landing page?

No. A sale can be credited to a visit where the buyer arrived from a post, even if they browsed other pages afterward. The credited visit is whichever your attribution model selects.

How long does it take for a post to start earning?

It varies a lot. Some buyers purchase in the same visit, others return weeks later. The path to purchase docs describe how Ownlytics measures time to buy, so you can see your own pattern instead of guessing.

What if my blog is on a different domain from my checkout?

The id lives on your site's domain. When checkout is on the provider's domain, the id travels as link tagging or metadata, which is why the three methods above exist.

See the live demo · View pricing

Keep reading