# Revenue by source, without building GA4 ecommerce

Source: https://databull.app/ga4-revenue-attribution
Updated: 2026-10-29 · Author: Ahmed Gagan (maker of DataBull)

> GA4 can show which channel made you money, once you send purchase events and keep the visitor attached through checkout. DataBull reads the payments from Stripe, Polar, Dodo or Creem directly and does the matching for you.

**Short answer:** GA4 only shows revenue it is sent: a purchase event with a transaction ID, value and currency, from the browser or from your server through the Measurement Protocol with the visitor's client_id. Hosted checkouts, renewals and refunds make that real work. DataBull connects to Stripe, Polar, Dodo Payments or Creem with an API key and credits each payment to its traffic source.

## What GA4 needs before it shows a dollar

GA4 doesn't know about your payments. Revenue appears in its reports only when you send it, as a `purchase` event that carries a `transaction_id`, a `value` and a `currency` (plus the items, if you want product reports). There are two ways to send it:

- **From the browser**, with gtag.js or Google Tag Manager, on the page buyers see after paying. Your thank-you page has to know the order's amount and ID, which usually means looking up the checkout on your server first.
- **From your server**, with the Measurement Protocol: a request with your measurement ID, an API secret and the visitor's `client_id`, the ID GA4's tag created in their browser. To credit the right session, you also pass the `session_id`. Both have to be captured before checkout and stored with the order.

## Where the source gets lost

A hosted checkout sends the buyer to another domain. When they come back from `checkout.stripe.com` or your payment provider, GA4 sees a new referral and can credit the payment page instead of the post that brought them. The fix is the **List unwanted referrals** setting in your web stream, which tells GA4 to ignore that domain. Google's own example of when to use it is a third-party payment processor.

Then the parts that never touch the browser:

- **Subscription renewals** happen on a schedule, with nobody on your site. Each one has to be sent from your server, tied to the original buyer's `client_id`.
- **Refunds** need a `refund` event with the same transaction ID, or GA4 keeps counting money you gave back.
- **Buyers who don't return** to the thank-you page (closed tab, slow redirect) leave no purchase event at all unless the server sends it.

None of this is exotic, and a team with a developer and a tag manager does it every day. For an indie product it's a webhook handler, a place to store client IDs, a Measurement Protocol client and a few edge cases, maintained for as long as the product exists.

## The payment-first shortcut

DataBull starts from the other end. You connect Stripe, Polar, Dodo Payments or Creem with an API key, per website, and:

- **Past sales are imported** when you connect, so you have history on day one.
- **New sales, renewals and refunds arrive by webhook.** Renewals keep the source of the first payment; refunds come off it.
- **Each payment is matched to the visitor**: payment links are tagged automatically, checkouts your server creates pass the visitor ID as metadata, and success pages are matched by checkout ID. Checkout pages aren't counted as sources.
- **The source is yours to define**: last non-direct (the default), first touch or last touch, set per site.

The result is revenue next to visitors for every channel, referrer, campaign, landing page and country, plus lifetime value by first source and the path each buyer took. AI assistants such as ChatGPT and Perplexity are their own channel, as in GA4.

|  | GA4 | DataBull |
| --- | --- | --- |
| Revenue data | Purchase and refund events you send | Read from Stripe, Polar, Dodo or Creem |
| Past sales | From the day you start sending events | Imported on connect |
| Renewals and refunds | Server-side events you build | Automatic, by webhook |
| Hosted checkout return | Unwanted referrals list | Handled; payment hosts never become a source |
| Ads and Google Ads | Built for it: conversions, audiences, bidding | Not an ads tool |
| Price | Free | Self-hosted once, or hosted from $9 a month |

## When GA4 is still the right tool

Be honest about the trade. GA4 is free, and if you run Google Ads, feed conversions into bidding or build remarketing audiences, it's the tool for that job and DataBull doesn't replace it. Plenty of sites run both: GA4 for ads, DataBull for "which post, search or assistant brought paying customers". If you're a team that already has a working GA4 ecommerce setup, keep it.

If you sell through Stripe, Polar, Dodo or Creem, don't run ads, and want to know what your posts and searches earn without a tagging project, DataBull gets you there with one script tag and one key. See [Stripe revenue analytics](https://databull.app/stripe-revenue-analytics) for the Stripe details, or [DataBull vs Google Analytics](https://databull.app/alternatives/google-analytics) for the full comparison.

Checked in October 2026 against: [Google Analytics: measure ecommerce](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce), [Google Analytics: Measurement Protocol, sending events](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events), [Google Analytics: identify unwanted referrals](https://support.google.com/analytics/answer/10327750), [Google Analytics: traffic-source dimensions](https://support.google.com/analytics/answer/9756891).

## FAQ

### Can GA4 import revenue from Stripe automatically?

No. GA4 has no Stripe connection; revenue reaches it only as purchase events you send from the browser or your server.

### Why does GA4 credit my sales to checkout.stripe.com?

Buyers return from the payment page with that domain as the referrer. Add your payment provider's domain under Admin → Data streams → Configure tag settings → List unwanted referrals.

### Do I need to remove GA4 to use DataBull?

No. They run side by side: DataBull has its own script tag and reads payments directly, so it doesn't touch your GA4 setup.

### Does DataBull track subscription renewals by source?

Yes. Renewals arrive by webhook and inherit the source of the customer's first payment, so lifetime value is grouped by the channel that first brought them.
