Skip to content

Revenue Attribution

B2B SaaSE-commerce

Pair Google Analytics 4 traffic with verified revenue

Connect GA4 read-only alongside Stripe or Shopify in Apex so you see GA4 sessions, engaged visits, and bounce rate right beside real collected money instead of guessed events.

Read-only analytics.readonly scope. Zero changes to your GA4 property.

6 min read10 min setupUpdated
Two SaaS teammates collaborating at a bright birch conference table inside a sunlit plant-filled coworking atrium.
Keep your existing GA4 property untouched while pairing source-level traffic context with verified collected revenue in Apex.

Interactive GA4 + revenue ledger

See GA4 sessions and bounce rate beside collected Stripe or Shopify revenue

Switch between sorting by raw GA4 traffic vs. Apex-attributed revenue to see why a smaller, high-engagement source can outperform a high-traffic social spike.

Illustrative workspace · 30-day GA4 + Stripe sync

GA4 sessions

46,490

Pulled read-only from GA4 Data API

GA4 engaged sessions

22,970

51% blended bounce rate

Apex-attributed revenue

$107,800

Collected Stripe / Shopify money

Paying customers

114

Matched by Apex attribution

GA4 sessionSource / sessionMediumGA4 sessionsEngaged sessionsBounce rateApex revenueRev / engaged session
google / cpc
Non-brand search campaigns
6,8503,97342%$36,900$9.29
google / organic
High-intent docs and comparison pages
14,2009,08836%$28,400$3.13
partner / referral
Creator links and agency referrals
2,1401,58426%$24,600$15.53
newsletter / email
Weekly product updates
4,9002,98939%$14,800$4.95
social / organic
Broad top-of-funnel posts
18,4005,33671%$3,100$0.58
GA4 stays read-only traffic context (sessions, engaged sessions, bounce rate, and active users by date, source, and medium). Apex joins collected Stripe or Shopify revenue to sources using Apex's own first-party attribution rather than trusting browser thank-you events or GA4's estimated conversion values.
How GA4 traffic pairs with collected revenue

Top channel when sorted by Apex-attributed revenue

google / cpc

6,850 sessions, 42% bounce rate, and $36,900 in collected revenue ( $9.29 per engaged session).

The complete playbook

Step-by-step setup, worked math, and real limits.

Steps, technical details, and live pricing.

How it works without Apex

Connect Google Analytics 4 in Apex using Google OAuth with the read-only analytics.readonly scope, pick your GA4 Property ID, and connect Stripe or Shopify in the same workspace. Apex pulls sessions, active users, GA4 conversions, bounce rate, and engaged sessions broken down by date, sessionSource, and sessionMedium without modifying your GA4 setup, then displays real collected revenue beside your traffic baseline.

How Apex does it for you

Apex syncs GA4 traffic and engagement metrics read-only via the GA4 Data API, pairs them with first-party Apex snippet sessions and Stripe or Shopify revenue, and lets teams compare organic, referral, direct, and paid channels on actual dollars.

How to set this up in 5 steps

  1. Connect Google Analytics 4 read-only

    Open Integrations -> Google Analytics in Apex, sign in with Google, and approve the read-only analytics.readonly scope. Apex never edits your GA4 tags, events, or property settings.

  2. Select your GA4 Property ID

    Pick the numeric GA4 Property ID for your production website from the property list returned by Google. Apex syncs the last 30 days by default across date, sessionSource, and sessionMedium.

  3. Install the Apex snippet alongside GA4

    Leave your GA4 tag running normally and add the lightweight Apex snippet so landing UTMs, click IDs, and first-party identify() calls persist across multi-week buyer journeys.

  4. Connect Stripe or Shopify for collected revenue

    Connect Stripe (or Shopify) in the same workspace so paid invoices, renewals, and refunds match back to the originating visitor session.

  5. Compare GA4 traffic quality against real cash

    Use Attribution and Analytics in Apex to place GA4 bounce rate, engaged sessions, and conversions directly next to collected revenue and channel CAC.

Where GA4 stops short

Google Analytics 4 is great for answering "how many sessions hit our site yesterday, and which sources had the lowest bounce rate?" It stops short the moment finance asks which organic articles, referral links, or ad campaigns actually produced collected money.

Because GA4 lives in the browser, three gaps appear in almost every SaaS and ecommerce account:

  • Browser key events drift from collected cash. A thank-you page fires once for a $29 trial and misses the $2,400 annual upgrade three weeks later, or counts an order that got refunded the next morning.
  • Last-click session reports (in any tool) over-credit direct and branded search. Even though GA4 defaults to data-driven attribution for its own key events, session-level last-click views hand credit to (direct) / (none) when a buyer discovers you from a partner link on Monday and returns directly to subscribe on Friday.
  • Ad blockers and Safari ITP hide traffic slices. Server-side Stripe or Shopify charges never suffer from blocked browser tags.
Hands of a small-batch coffee roaster arranging kraft bags with printed roastery labels on a sunlit oak counter.
Apex reads GA4 sessions, active users, engaged sessions, and bounce rate strictly read-only via analytics.readonly OAuth.

What Apex syncs from GA4

Connecting Google Analytics 4 in Apex uses Google's read-only analytics.readonly scope. Apex pulls five metrics from the GA4 Data API broken down by date, sessionSource, and sessionMedium (defaulting to the last 30 days):

GA4 MetricWhat it gives your team in Apex
Sessions & Active UsersOverall top-of-funnel traffic volume so experiment and conversion rates stay grounded in context
Engaged SessionsVisits lasting 10+ seconds, converting, or viewing 2+ pages
Bounce RateSingle-page session share so low-intent traffic spikes stand out immediately
GA4 ConversionsSide-by-side reference against your existing GA4 key-event counts
Boutique ceramics shop owner holding a freshly glazed vase inside a sunlit retail showroom.
Compare organic, referral, direct, and paid sources on actual collected Stripe or Shopify cash instead of browser-only key events.

Running GA4 and Apex together

You do not need a risky rip-and-replace weekend. Leave your GA4 tag running, connect your GA4 Property ID read-only in Apex, install the Apex web snippet, and connect Stripe or Shopify. GA4 supplies read-only traffic context (sessions, engaged sessions, and bounce rate by sessionSource and sessionMedium), while Apex joins collected Stripe or Shopify revenue to each source through Apex's own first-party attribution so you can inspect both side by side.

What this costs on Apex

Live Apex pricing · Pay-as-you-go

Estimated Apex cost for SaaS team syncing GA4 traffic alongside Stripe with 25,000 monthly web events

$0 / month

Covered by monthly free allowances.

Apex meter / scheduleScenario volumeFree allowance / basisRateApex cost
Events
First-party landing and sign-up events (25,000 monthly web events)
25,000 / mo1M / month$5 per 100K events$0

Google Analytics 4 and Stripe connectors are both included with zero extra connector fees. History: 13 months no card, 3 years with card, 7 years once you've paid an invoice. Live pricing.

Third-party and campaign costs (not paid to Apex)

ExpenseTypical rangeNotes
Google Analytics 4 Data API$0/moRead-only GA4 property sync included with zero connector surcharge

Launch with your AI agent

Inspect connected traffic sources beside verified revenue via MCP

After connecting Google Analytics 4 and Stripe in Apex, ask your coding agent to inspect your synced Data Sources, hostnames, and verified revenue performance by source.

1Add Apex to your editor

Install in Grok Build

Opens Grok Build and adds Apex. Nothing to configure.

2Tell your agent

Prompt for your AI editor

In my Apex workspace, call get_analytics_sources and get_analytics_hostnames to inspect our traffic breakdown by Data Source and hostname, then call get_source_performance to review verified Stripe revenue by link, campaign, or platform.

The first time your agent calls Apex, it gives you a link to approve in the browser. There is no key to paste. In Grok Build you can also run /setup-apex.

See how editor setup works step by step

growth-site · Grok BuildWaiting for approval
Agent
You

Set up Apex in this repo.

Set up Apex · 0 of 4
  • Signed in
  • Workspace named
  • Events arriving
  • Conversion picked
  • Stripe

Your move

Keep GA4 for traffic context and use Apex for revenue truth.

Connect your GA4 property read-only in 10 minutes and compare every source's engaged sessions against verified Stripe or Shopify dollars.