MMeerPartners docs

Tracking links and macros

How MeerPartners tracking links work: the /r/{code} format, sub_id parameters, the attribution cookie, the redirect with aff_click, macros and the pixel fallback. How to link a click to an order for the postback.

A tracking link is the entry point into the funnel. The partner gets a link to your offer, drives traffic through it, and on every click the platform records an event, sets an attribution cookie and redirects the user to your landing page — adding a click_id to the URL. You will later return this click_id in the postback, so the conversion is attributed to the right partner.

https://<tracking-domain>/r/{code}
  • {code} — the short identifier of the partner's tracking link.
  • The tracking domain is separate from the API and the portal (e.g. go.meerpartners.com). The exact address is issued together with the link; do not construct it yourself.
GET/r/{code}🔒

The endpoint is public and outside the /api/v1 version. It responds with a 302 redirect within single-digit milliseconds and almost never returns an error to a live user (so as not to break ads).

Query parameters

You can append labels to the link — they are stored in the click for end-to-end analytics and passed further on.

ParameterPurpose
sub_id1sub_id5Up to five arbitrary partner labels (source, campaign, creative). Also accepted in the short form sub1sub5. Each is truncated to 128 characters.
utm_* and other deep-link parametersPassed through to the target URL according to the offer settings.
Link with labels — example
https://go.meerpartners.com/r/a8Kf2?sub1=youtube&sub2=video-42&utm_campaign=june

sub_id in the postback

If you want to keep a sub_id in the conversion, pass it to the postback in the sub_id field. On the redirect the labels are written to the click, but they reach the conversion through the postback.

What happens on a click

Link resolution

The platform finds the tracking link by {code} (with a cache). An unknown code → TRACKING_LINK_NOT_FOUND (404).

Filtering and dedup

Bot filtering and anti-flood: a repeat click by the same user within a 5-minute window counts as one physical click. Bots are flagged and get no cookie, but are still redirected.

Click recording and click_id generation

The click event goes off for processing, and a click_id (UUID) is generated in advance — it is needed both for the cookie and for the redirect.

Cookie + 302 redirect

A signed aff_attr cookie is set, and the user is redirected to the offer's landing page with the added parameter aff_click=<click_id>.

  • Contains { click_uid, offer_id, affiliate_id, ts }, signed with HMAC (integrity protected by the signature).
  • Max-Age = the offer's attribution window (about 30 days by default; set on the offer as attribution_window_hours).
  • SameSite=Lax, Secure. Readable from JS (HttpOnly=false) — it is read by the embed SDK.
  • The model is last-click: every new click overwrites the cookie.

The redirect and aff_click

HTTP/1.1 302 Found
Location: https://your-product.io/promo?utm_campaign=june&aff_click=9b1f7c2e-…
Set-Cookie: aff_attr=…; Max-Age=2592000; Path=/; SameSite=Lax; Secure

aff_click is the click_id. It duplicates attribution on the server side: the cookie may be lost (Telegram, WebView, third-party cookie blocking), but the URL parameter survives the navigation. This is the most reliable way to link a click to an order.

This is the key step for correct attribution:

Capture aff_click on the landing page

When the user arrives on your landing page, read the aff_click query parameter and save it in the session/cart.

Store it next to the order

At checkout, write aff_click into the order record in your database.

Return it in the postback as ref

When the order is paid, send a postback with ref = aff_click — the platform finds the exact click and attributes the conversion to the partner.

Example: capture aff_click on the landing page (browser)
const clickId = new URLSearchParams(location.search).get("aff_click");
if (clickId) {
  // store in long-lived storage and bind it to the future order
  localStorage.setItem("aff_click", clickId);
}

If aff_click did not arrive

When ref is empty or the click is not found, the platform responds with accepted:false and POSTBACK_UNKNOWN_REF — the conversion is treated as organic. To minimize this, always pass aff_click through from your landing page and keep it until payment.

Macros in the target URL

In the offer's landing settings you can use macros — the platform substitutes real values on the redirect:

MacroSubstituted with
{click_id}The click identifier (a.k.a. aff_click)
{affiliate_id}The ID of the partner whose link brought the click
{offer_id}The offer ID

This is handy if your landing page needs the click identifier not only in aff_click but also in a parameter of its own.

Pixel fallback

Where a redirect is impossible (an email, a context with <img>), a pixel is used — it records the same click and returns a transparent 1×1 GIF.

GET/p/{code}.gif🔒
Embedding the pixel
<img src="https://go.meerpartners.com/p/a8Kf2.gif" width="1" height="1" alt="" />

The pixel records the click the same way as /r/{code}, but without a redirect. The cookie may not be set in this case (it depends on the context), so for reliable attribution the primary mechanism is the redirect with aff_click.

What's next