Skip to content

GA4 server-side tracking, Measurement Protocol

GA4 revenue that adds up to what your store sold.

GA4 server-side tracking through the Measurement Protocol: AxiTrace sends each purchase from your server to your GA4 property, with the client id and the session id your GA4 tag uses. GA4 files the sale under the visit it belongs to and counts it once. There is no Tag Manager container to build.

  • All 9 platforms on every plan
  • Free up to 10,000 visits a month
  • No credit card
Order #10931As GA4 receives it
  • Event purchase a recommended GA4 event
  • Order number transaction_id one purchase per order
  • Order value value, currency from the order in your store
  • Products bought items ids, quantities and prices
  • Shipping and tax shipping, tax

GA4 gets the sale from your server as its own purchase event, with the order value, the products, shipping and tax.

What the GA4 tag misses

GA4 counts only the purchases its tag managed to send.

gtag.js runs in your buyer's browser and reports the purchase from the page after checkout. That is why GA4 shows fewer orders and less revenue than your store does.

  • up to 30%

    of orders never reach the GA4 tag

    Every conversion rate, every channel report and every ROAS figure in GA4 is worked out from the purchases that arrived.

  • 1 in 3

    shoppers uses an ad blocker

    The pixel never loads. For Meta and Google that visit, and the order it ends with, never happened.

  • 1 page

    decides whether the purchase is reported

    The thank-you page. A buyer who pays on the bank's or PayPal's site and closes the tab never opens it, so the pixel never fires.

How it works with GA4

From your server, into the visit GA4 already has.

AxiTrace takes each order your store recorded and sends it to your GA4 property through the Measurement Protocol, Google's server-to-server API for GA4. It reads the client id and the session id from the cookies your GA4 tag set, so the server event lands on the same user and the same visit.

  • One purchase per order The order number goes out as transaction_id. GA4 keeps one purchase per transaction id, so tag and server never add up to two.
  • Purchases first, the funnel if you want it Page views, product views and carts can be sent too. Next to a running GA4 tag, leave them off: GA4 deduplicates purchases only.
  • Nothing to build No Tag Manager, no server container and no tag to write. Your events are mapped to GA4's recommended event names for you.
See what each platform receives
One purchaseWhat GA4 counts
  • GA4 tag Blocked by an ad blocker
  • Server event purchase sent by AxiTrace
  • Order number transaction_id
  • GA4 counts One purchase

The tag never reported this order. The server event is the only copy GA4 gets, so the revenue is in your reports after all.

What changes

Fewer orders missing in GA4. Revenue you can check.

GA4 can only report what it received. With every purchase sent from your server, its numbers move towards the ones in your store.

  • Revenue

    The purchases GA4 was missing

    Orders the tag never reported now arrive with value, tax, shipping and products. Compare a day in GA4 with the same day in your store.

  • Channels

    Sales land on the visit they belong to

    The server event carries the client id and session id of your tag, so GA4 reports the purchase with that visit, not as a stray one.

  • Refunds

    Returns lower GA4 revenue too

    A refund your store records is sent as GA4's refund event with the same transaction id, so revenue in GA4 falls when yours does.

Setup

A Measurement ID and an API secret. Nothing to tag.

  1. Install the app or plugin

    Shopify, WooCommerce, PrestaShop, Shopware or Magento. Any other store uses one 11 KB script or a GTM tag.

  2. Paste your Measurement ID and API secret

    Both come from your web data stream in GA4 Admin, under Data Streams: the Measurement ID that starts with G- and a Measurement Protocol API secret you create there. Test connection checks them with GA4.

  3. Choose the events to send

    Purchases and refunds are the recommended set when your GA4 tag is running. A property with EU data residency gets Google's EU endpoint with one switch.

  4. Watch the Event feed

    The first events appear as soon as visits and orders come in, each with its platform and its status, so you can check the data before you trust it.

The facts

GA4 through the Measurement Protocol, in short.

Plan

All 9 platforms on every plan, Free included. A plan is sized by visits, not by events or by platforms.

See pricing
Events sent

Purchases and refunds, and the rest of the funnel when you switch it on, all under GA4's recommended event names. Search, leads and sign-ups are sent where your store has them.

  • page_view
  • view_item
  • add_to_cart
  • begin_checkout
  • add_payment_info
  • purchase
  • refund
Matched on

The GA client id from the _ga cookie and the session id from the GA4 session cookie, so the event joins the user and the visit your tag recorded.

  • client_id
  • session_id
  • user_id
Deduplication

By transaction id, and for purchases only. GA4 keeps one purchase per order number. Any other event sent by both the tag and the server is counted twice.

Consent

With the consent gate on, an event from a visitor who refused is not sent to GA4.

Limits

A buyer whose browser blocked the GA4 tag has no _ga cookie. The purchase is still sent, under a client id AxiTrace builds, so GA4 counts the revenue but has no visit of its own to put it on.

Tag Manager

Not needed. There is no container, no trigger and no variable to set up, on the web or on a server.

Your data

Stored in the EU, on Google Cloud in Warsaw, under a data processing agreement.

Frequently asked questions

Something else on your mind? Ask us directly

How does AxiTrace send events to GA4 server-side?

Through the GA4 Measurement Protocol, Google's server-to-server API for GA4. AxiTrace takes the order from your store and sends it to your property as a purchase event, with the transaction id, value, currency and products, and with the client id and session id your GA4 tag set in the browser. Because the event leaves from a server, an ad blocker or a closed tab cannot stop it.

Why are my GA4 purchases lower than my store reports?

The GA4 tag reports a purchase from the buyer's browser, on the page after checkout. Ad blockers stop the tag, and a buyer who pays on the bank's site and closes the tab never opens that page. Together such losses hide up to 30% of orders. Your store has every one of them, and AxiTrace sends them to GA4 from there.

Does AxiTrace deduplicate GA4 events?

Purchases, yes. Every purchase goes out with your order number as its transaction id, and GA4 keeps one purchase per transaction id, so a sale reported by the tag and by the server is counted once. GA4 does this for purchases only. That is why purchases and refunds are the recommended set when your GA4 tag is running: a page view or a cart sent from both sides would be counted twice.

Do I keep gtag.js or my Tag Manager setup?

Yes. Your tag keeps recording visits, traffic sources and what people do on the page, which a server cannot see. AxiTrace adds the purchases the tag missed, with the same client id and session id, so they join the visits your tag recorded. When the tag already sends page views and carts, leave those switched off in AxiTrace.

What happens to an order when the GA4 tag was blocked?

It is still sent, so the revenue is in GA4. A browser that blocked the tag has no _ga cookie, so AxiTrace builds a client id from its own visitor id, and GA4 counts the purchase without a visit of its own behind it. In AxiTrace the same order keeps its full path, with every visit and ad click before it.

What do I need from GA4 to connect it?

Two values from GA4 Admin, under Data Streams, in your web data stream: the Measurement ID, which starts with G-, and a Measurement Protocol API secret you create on the same screen. Paste both into AxiTrace and press Test connection. If your property keeps its data in the EU, switch on the EU endpoint.

Which plan do I need?

All 9 destinations are on every plan, including the Free plan with 10,000 visits a month and no credit card. Each eligible AxiTrace session counts as one visit, however many events or platform deliveries it generates, so the plan you need depends on your traffic, not on how many platforms you connect.

Send GA4 the orders its tag is missing.

Free up to 10,000 visits a month. Pro and Business are free for 14 days, with no card and no automatic charge.

Start Free

An agency, or more than 3M visits a month? Talk to us

  • Data stored in the EU
  • GDPR, with a DPA
  • On the Shopify App Store
  • Plugin on WordPress.org
  • In ChatGPT and Claude

AxiTrace demoSample store

AxiTrace

Store revenue$42,300last 30 days
Ad spend$9,9755 campaigns on 3 ad platforms
Store ROAS4.24revenue over ad spend
Orders1,223from every source

ROAS next to profit after costs

Store ROAS4.24 Campaign profit+$3,015

Store ROAS counts all revenue. Campaign profit subtracts the product costs and the ad spend of each campaign.

Axi, morning briefing

Two campaigns lose money after costs: Google Shopping and TikTok Video. Meta Prospecting holds a steady profit and is the one to scale in steps.

Store revenue (estimate)
Ad spend (estimate)
Store ROAS (estimate)
Orders (estimate)
What we found on your store
Ad platforms
    Tracking

      ROAS next to profit after costs

      Store ROAS Campaign profit

      Store ROAS counts all revenue. Campaign profit subtracts the product costs and the ad spend of each campaign.

      Example for a store your size Connect your store to see yours
      Axi, morning briefing

        AxiTrace fixes this for

        Connect your store and these estimates turn into your real numbers. Live the same day, without a developer.

        • Server-side trackingRecovers the orders your pixels miss and sends them back to Meta, Google and TikTok.
        • Profit per campaignEvery campaign after product costs, shipping, fees and ad spend.
        • Attribution you can trustFirst click, last click and data-driven, from the orders your store recorded.
        • Click fraud blockingFlags bots and serial clickers. On Business, Auto Exclusion blocks them in Google Ads.
        • Leads and orders with their sourceEvery order and form lead with the campaign that brought it.
        • Axi, your AI advisorTells you every morning what to cut, what to scale and what to check.

        Sample data. In your own account you see your own store.

        (Estimates based on public data. Connect your store to see real numbers.)

        Start Free