Tracked
Articles

Google Analytics

Google Analytics postback URL for affiliate tracking: what works

GA4 does not accept an affiliate tracker callback URL. Use Tracked to match the sale to an offer click, and use GA4's separate event contract for analytics.

There is no GA4 field where you paste a generic affiliate postback URL and automatically receive sales. A network postback reports a conversion to a tracker such as Tracked. Google Analytics 4 receives server events through its authenticated Measurement Protocol, which has a different endpoint, method, and identity contract.

For a media buyer, the useful first step is to make the affiliate sale visible against the original campaign click. Tracked can receive the network's callback, attach it to the recorded offer click, and show the attributed journey. GA4 can measure tagged site activity alongside that workflow; sending the eventual affiliate sale into GA4 requires a separate implementation.

Two URLs with different jobs

DestinationWhat it receivesWhat it needs
Your Tracked domain's /postbackAn advertiser or affiliate network's confirmed lead or saleThe Tracked offer-click value returned as click_id, plus supported event fields
GA4 Measurement Protocol /mp/collectAn event sent to a GA4 web or app streamAn authenticated POST with the stream's identifiers and a JSON event body

The Tracked callback and the GA4 event can describe the same business outcome, but one request cannot substitute for the other. Google's web-stream example uses measurement_id and a private api_secret in the request URL, plus a client_id and events in a JSON POST body. Keep that secret on a trusted server; do not place it in an ad URL, landing page, or affiliate-network callback template.

A practical affiliate tracking sequence

Paid ad → Tracked campaign URL → hosted page → /click/1 → affiliate offer
                                                 ↓
                           network saves the Tracked offer-click ID
                                                 ↓
                           approved sale → Tracked /postback → journey/report

Set up and verify that chain before adding another analytics destination:

  1. Tag the incoming campaign. Keep useful utm_source, utm_medium, and campaign values consistent. If the traffic source supplies its own click identifier, inspect the real landing request and preserve that value too.
  2. Track the offer action. Point the page's offer button at its /click/N slot. Put {{click.id}} in the advertiser's supported sub-ID field on the configured offer URL. Tracked resolves this macro when the visitor takes the offer action; it is not available as an offer-click ID in the initial hosted-page HTML.
  3. Return the same value. When the advertiser confirms a sale, configure its callback to call https://YOUR_TRACKED_DOMAIN/postback?click_id=TRACKED_CLICK_ID&payout=25, using its real macro for the saved ID. An untyped callback is the primary conversion path; explicitly typed callbacks are secondary events with zero payout in the current handler.
  4. Inspect the result. Match one test conversion to the exact offer click, page, campaign, and payout in Tracked. A successful HTTP response alone does not prove that the event was stored.

The postback setup guide shows the supported callback fields and retry checks. The click-ID and UTM guide explains why campaign labels cannot replace the event-level join key.

When GA4 belongs in the setup

A GA4 tag can measure page views and other browser interactions on a landing page you control. Use its own data stream and consent configuration. A sale that occurs later on an affiliate network's checkout is a separate source-owned event; the initial page tag cannot verify that sale by itself.

If you need an approved sale in GA4 as well, your server-side bridge must receive a verified conversion, retain the GA4 identity needed for the intended web or app stream, and send the appropriate Measurement Protocol request. GA4's client_id identifies a web client instance; it is not the Tracked offer-click ID and should not be invented from a network order number. Google recommends validating the event format with its Measurement Protocol validation server and checking whether the event appears in the intended property.

Do not put the GA4 API secret into Tracked's public /postback URL. The two systems can be connected by an authorized server integration, but the current Tracked article workflow does not include an automatic GA4 conversion export.

Google Analytics is not Google Ads conversion upload

Google Ads has a separate offline conversion path for eligible Google click identifiers such as gclid, gbraid, or wbraid. Tracked supports configured click-ID uploads through Google's Data Manager API. That sends conversion feedback to Google Ads; it is not a GA4 Measurement Protocol event. The Google Ads offline conversion guide covers the upload requirements and checks.

Choose the destination according to the decision you need to make: Tracked for the attributed affiliate journey, GA4 for your analytics property, and Google Ads for supported ad-platform conversion feedback. Verify each destination separately.

Where Tracked is today

Tracked's inbound /postback endpoint and campaign journey are available. It accepts a recorded offer-click ID and can attach the returned conversion to the right campaign context. The current product does not expose a native GA4 Measurement Protocol export for those stored conversions. A GA4 server event requires a separate, authorized integration with the correct GA4 identity and secret handling.

You can still use Tracked now to build the page-to-offer-to-sale workflow that a paid-traffic buyer needs to inspect. Start free and trace a campaign.

Frequently asked questions

Can I paste a GA4 Measurement Protocol URL into an affiliate postback field?

Not as a drop-in replacement for a tracker callback. GA4 expects an authenticated POST with a JSON event and stream-specific identity. An affiliate network field designed to call a simple GET URL may not support that contract, and exposing the GA4 API secret in a public template is unsafe.

Does Tracked /postback automatically send the sale to GA4?

No. It receives and attributes the network event in Tracked. A separate implementation is needed if you also want to send the verified event to a GA4 stream.

Is gclid the same as GA4 client_id or Tracked click_id?

No. gclid is a Google Ads click identifier when supplied, GA4 client_id identifies a web client instance, and Tracked's offer-click ID links an advertiser callback to its recorded click. Keep their names and storage roles separate.

Should I use Google Ads offline conversions instead of GA4?

Use the destination that matches your reporting or optimization goal. Google Ads offline conversion uploads send eligible click-based feedback to the ad platform. GA4 Measurement Protocol adds an event to your analytics stream. Neither replaces the Tracked network-to-click callback that verifies which offer action produced an affiliate sale.