Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

What Is a Postback URL? Server-to-Server vs Cookie-Based Affiliate Tracking

A plain explanation of postback URLs for marketers and agency owners: how the click ID travels out and back, a worked impact.com and Awin example, how it compares with pixel tracking, the browser limits that still apply, and the faults to check.

The EndFrame Team7 min read

A postback URL is an address your server calls to tell an affiliate network, or an ad tracker, that a conversion happened. The idea is simple: when a visitor clicks a partner's link, the network adds a unique click ID to the landing page URL. Your site keeps that ID. When the visitor buys, your server sends it back to the network together with the order details, and the network credits the partner who sent the click. Because the report goes from server to server, it is often called S2S tracking. This guide walks through one real network's flow, compares it with pixel tracking, and covers the part most explainers skip: the click ID still has to be stored, and browsers limit that storage.

How a postback works, step by step

impact.com's documentation for its API (Online Sale) integration is a clear example, because it spells out each step. Imagine a visitor clicks a partner's link on 3 March and buys a 120 USD order on 18 March.

  1. 1The click ID arrives on the landing URL. impact.com appends a query string parameter called im_ref to your landing page, so the visitor lands on something like example.com/?im_ref=abc123. The value identifies that referred visit.
  2. 2Your site stores the click ID. impact.com says to keep it in a first-party cookie or on your server, and that the cookie's lifetime must match the referral window in your contract, which it describes as typically 30 days. It should still be available if the visitor comes back directly in a later session, and it must be passed along if the journey crosses to another domain.
  3. 3Your server sends the conversion. When the order is placed on 18 March, your server makes a POST request to impact.com's Conversions endpoint with fields such as CampaignId, EventTypeId, EventDate, ClickId (the stored abc123), OrderId, CurrencyCode and per-item values such as ItemSubTotal1. This is a server-side call, authenticated with your account credentials.
  4. 4The network credits the partner. impact.com decides attribution, awards the conversion to a partner and records it as a new pending action.

impact.com also recommends retrying any call that fails with a 5XX server error, using exponential backoff and a sensible maximum such as five attempts. That detail matters later, because retries are one way the same sale gets sent twice.

What a postback template looks like

Networks give you a template URL with placeholders that your developer replaces with real values for each order. Awin's Direct S2S integration is a good example of the classic GET format. Awin adds a parameter called awc to the landing page URL, your site stores it, and on the confirmation step your server calls https://www.awin1.com/sread.php with a query string of tt=ss&tv=2&merchant={{advertiserId}}&amount={{totalAmount}}&ch={{channel}}&parts={{commissionGroup}}:{{totalAmount}}&vc={{voucher_code}}&cr={{currencyCode}}&ref={{orderReference}}&testmode={{isTest}}&cks={{awc}}. The double curly braces are Awin's placeholders, not values to send as written. Awin itself highly recommends its authenticated Conversion API over hand-written S2S code, but this template shows the shape of a classic postback.

ParameterWhat it carriesExample value
merchantYour Awin advertiser IDYour own ID
amountOrder value, described as the total net value of goods120.00
crISO 4217 currency codeUSD
refYour unique order reference, up to 50 characters10045
partsCommission group and amount, as group:amountDEFAULT:120.00
cksThe awc value captured on the landing pageThe stored click value
testmode0 for live tracking, 1 for testing0

Other platforms use different names and formats, and impact.com uses an authenticated POST rather than a GET URL. Always copy the template from your own network's documentation rather than from a blog post, including this one.

Postback vs pixel tracking

The alternative is a conversion pixel: a tag on the order confirmation page that fires in the buyer's browser and reads the click information the network stored earlier. Here is how the two compare.

QuestionConversion pixelServer postback
Where the identifier livesIn the browser, read by the network's script on the confirmation pageCaptured from the landing URL and kept in a cookie or your database, then sent by your server
What breaks itAd blockers, scripts that fail to load, a confirmation page the buyer never sees, browser storage limitsA click ID lost before storage, a wrong field in the template, a backend job that fails silently
Who builds itPaste a tag, often through a tag manager or a platform pluginA developer, because it touches your order system and needs credentials kept on the server
Refunds and late conversionsFires once at checkout and cannot report a later refund or an upgradeYour server knows about refunds and renewals, so it can report or correct them where the network supports it

Many networks support both and expect you to run them together. Awin, for example, also offers a client-side conversion tag and says server calls made more than 3 minutes after the client-side request are not considered when it prioritises tracking methods, so it asks for the S2S call preferably within the first two minutes.

The click ID still has to be stored

Vendor explainers often describe postbacks as cookie-free. The report is, but the click ID is not. Both impact.com and Awin expect you to keep the ID, usually in a first-party cookie, between the click and the sale. That storage is subject to browser rules, and Safari's are the strictest.

WebKit, the engine behind Safari, deletes cookies created in JavaScript and other script-writeable storage, such as localStorage, after 7 days without user interaction with the site. When it detects that a visitor arrived through link decoration, meaning a click ID added to the URL, it caps the expiry of cookies created in JavaScript on that landing page at 24 hours. So if a script on your landing page saves im_ref or awc into a cookie, a Safari buyer who returns on day 3 of a 30-day referral window may have nothing left to send. Our guide to Safari ITP cookie lifetimes explains these caps in more detail.

  • Set the cookie from your server in the HTTP response. Awin requires this for its awc cookie: it must be set through a response header, not by client-side script, with the HTTPOnly and Secure flags.
  • Use your own server for it. WebKit caps cookies set in HTTP responses at 7 days when it detects CNAME or IP address cloaking that involves a third party, so a third-party service behind a subdomain does not get the same treatment.
  • Save the click ID against the customer or the basket in your database as soon as you can, so a sale that happens on another device or after the cookie is gone can still carry it.

Whether a click ID survives the trip to your landing page at all is a separate question. Our guide to Safari link tracking protection covers when Safari removes known click IDs from URLs.

Same pattern as ad platform conversions APIs

Ad platforms use the same pattern. Google Ads adds gclid to your URLs when auto-tagging is on, and that ID can later be used for offline conversion tracking. Meta adds fbclid when someone clicks an ad on Facebook or Instagram. Meta's documentation suggests formatting it into the fbc value, setting it as an HTTP cookie with a 90-day expiry or storing it in your backend, and sending it with every Conversions API event. That is a postback in all but name: an ID goes out with the click and comes back with the conversion, sent from a server. The recipient is the ad platform instead of an affiliate network. Our guides to what a conversions API is and to fbclid, _fbc and _fbp cover those versions.

Common postback faults

  • The click ID is dropped by a redirect. A redirect from http to https, from the bare domain to www, or through a consent or geo page can lose the query string. Click a live partner link and read the final URL in the address bar.
  • The wrong value goes into the click ID field. A placeholder left unreplaced, so the network receives the literal text {{awc}}, or a UTM value sent where the click ID belongs, means no partner can be matched.
  • The same sale is sent twice. A retry after a timeout, a thank-you page that runs the call on every reload, or a pixel and a postback both counted without deduplication. Send a stable, unique order reference such as OrderId or ref every time and ask your network how it handles repeats. Our guide to duplicate conversions covers the same problem on ad platforms.
  • Amount and currency do not match the contract. Awin describes amount as the total net value of goods but does not define tax, shipping or discounts, so confirm them with your network. EUR orders sent with the currency set to USD misstate commission.
  • Test mode is left on. On Awin, testmode=1 deactivates tracking, so a setup copied from testing can report nothing in production.

When a pixel is enough, and when a postback is worth it

A pixel is enough when your partner programme is small, sales happen in the same session as the click, every order ends on a confirmation page you control, and nobody is disputing commissions. Our guide to UTM parameters for influencer and affiliate links covers tagging those links so the traffic is also readable in your own analytics.

A postback is worth the developer time when partner revenue is large enough that missing sales cost real money, when orders are confirmed later or off the website (phone orders, invoices, subscriptions that start after a trial), when you need to report refunds or adjust order values, or when the network asks for it. Budget for storing the click ID properly, not just for the API call, because that is where most of the reliability comes from.

If you already use EndFrame, it stores the query parameters that arrive on each visit, so an im_ref or awc value is recorded with the visit it arrived on, and it can forward conversions to a custom webhook. It has no built-in affiliate network integrations, so matching a sale to its click ID and making the network's postback call is a service you would build yourself.

Frequently asked questions

What is the difference between a tracking link and a postback URL?

They travel in opposite directions. The tracking link is the outbound URL a partner shares: it records the click on the network's side and sends the visitor to your site with a click ID attached. The postback URL is the inbound report: your server calls it after the sale and sends that same click ID back. You need both, and the click ID is what joins them.

Can a postback report a sale that happens weeks after the click?

Yes, as long as you still have the click ID and the sale falls inside the referral window your contract sets. impact.com's conversion call includes an EventDate field for when the conversion happened. The usual reason late sales go missing is not the postback itself but a click ID that was deleted or never saved against the customer.

Does a postback remove the need for cookie consent?

No. A postback changes how the conversion is reported, not whether you may store the click ID or share the sale with a partner. Those questions depend on your jurisdiction and your consent setup. impact.com publishes separate guidance for sending conversions with consent mode, so ask your network what it expects and check the rules with your own legal adviser.

Is a postback the same thing as a webhook?

Technically they are close relatives: both are an HTTP request one server sends to another when something happens. In affiliate and ad tracking, postback usually means the specific call that reports a conversion and carries a click ID. A webhook is the general term, and many tools can send a webhook that your developer turns into a postback in the format a network expects.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading