# Affiliate Click ID Journey

> How the AnyTrack Click ID travels from your website to an affiliate link, is stored by the network, and comes back in the conversion postback.

Affiliate conversions happen on someone else's website. You never see the sale — the network does. The only thing connecting that sale back to the ad you paid for is a single value that has to survive the whole trip: the [AnyTrack Click ID](/docs/anytrack-click-id).

This page follows that value hop by hop, from the visitor landing on your site to the network's postback arriving in AnyTrack. Each hop has one job, one way to verify it, and one common way it breaks.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "The Tracking Tag is installed on the page carrying your affiliate links", done: true },
    { label: "Your affiliate network is connected in the Integration Catalog, or set up as a Custom Integration", done: true },
    { label: "Your affiliate links are standard HTML anchor tags", done: true },
  ]}
/>

## The Chain

<TrackingFlow title="How the Click ID Reaches Your Affiliate Conversion" subtitle="One identifier, five handoffs, from your landing page to the conversion postback">

  <FlowStep number={1} phase="visitor" title="Visitor Lands on Your Site" code="atclid = IBTO9lOfAMybrKiiB1U9YG91IFjs3Dv9AV">
    The visitor clicks your ad and arrives on your page. The [Tracking Tag](/docs/anytrack-tag) generates a Click ID for that session and records the traffic data that came with the click — the `gclid` or `fbclid`, the UTM parameters, the referrer.

    From this moment the Click ID represents *this visitor, from this ad*.
  </FlowStep>

  <FlowStep number={2} phase="visitor" title="Visitor Clicks Your Affiliate Link" code="https://offer.com/?tid=IBTO9lOfAMybrKiiB1U9YG91IFjs3Dv9AV">
    [AutoTag](/docs/autotag) appends the Click ID to the outbound URL using the parameter that network expects — `tid` for ClickBank, `subId1` for Impact, `sid` for CJ, `u1` for Rakuten. AnyTrack also fires an `OutboundClick` event and sends it to your connected ad platforms.

    The visitor leaves your site carrying the Click ID in the URL.
  </FlowStep>

  <FlowDivider />

  <FlowStep number={3} phase="anytrack" title="The Network Stores the Click ID" note="This is the network's job, not AnyTrack's. Whatever value arrives in the SubID parameter is what the network will hand back later.">
    The affiliate network registers the click and stores your Click ID alongside its own click record, in the SubID field. Nothing is sent to AnyTrack at this stage — the value is simply parked on the network's side, waiting for a conversion.
  </FlowStep>

  <FlowStep number={4} phase="anytrack" title="The Visitor Converts on the Merchant's Site">
    Hours or days later the visitor buys. The sale is recorded by the network against the click record from step 3 — the one holding your Click ID.

    Nothing happens on your website, and nothing is visible in your browser. This is why affiliate tracking cannot rely on pixels.
  </FlowStep>

  <FlowDivider />

  <FlowStep number={5} phase="anytrack" title="The Network Fires the Postback to AnyTrack" code="https://t1.anytrack.io/XXXXXXXX/collect/network?click_id=IBTO9lOfAMybrKiiB1U9YG91IFjs3Dv9AV&amount=47.00">
    The network sends a server-to-server [postback](/docs/custom) to your AnyTrack integration URL, returning the stored Click ID in the `click_id` parameter, along with the commission amount and transaction ID.

    Because this is server-to-server, ad blockers, cookie restrictions, and browser privacy settings have no effect on it.
  </FlowStep>

  <FlowStep number={6} phase="result" title="AnyTrack Matches and Sends the Conversion">
    AnyTrack looks up the Click ID, finds the original session from step 1 — including the ad that produced it — and records the conversion. It then sends the enriched event to your connected ad platforms through the [Conversion API](/docs/conversion-api), so Meta, Google, and TikTok can optimize on the sale.
  </FlowStep>

</TrackingFlow>

<Callout icon="📘" theme="info">
**The Click ID never travels alone**

At step 1 the Click ID is attached to the visitor's full session — the ad click, the UTM parameters, the landing page. The affiliate network only ever sees an anonymous string. When the postback returns it at step 5, AnyTrack re-attaches everything the network never had. That is why the conversion can be attributed to a specific ad without exposing your traffic source to the network.
</Callout>

## Verify Each Hop

You can check every hop yourself. Work down the list and stop at the first one that fails — that is where the chain is broken.

| Hop | What to check | Where |
|-----|---------------|-------|
| 1. Click ID generated | Run `AnyTrack('atclid')` in the browser console on your landing page. It should return a string. | Browser console |
| 2. Link tagged | Right-click your affiliate link, choose **Copy link address**, and paste it somewhere. The SubID parameter should hold a Click ID value, not `--CLICK-ID--` and not an empty value. | Live page |
| 2. Click recorded | The `OutboundClick` event appears for the session. | Conversions Report |
| 3. Network received it | The network's own click or SubID report shows your Click ID value. | Affiliate network dashboard |
| 5. Postback arrived | The conversion appears with a `click_id` value in the payload. | Integration [Events Log](/docs/integration-event-log) |
| 6. Conversion attributed | The conversion is tied to the original campaign and sent to your ad platforms. | Campaign Report |

<Callout icon="⚠️" theme="warning">
**Test the copied link, not the rendered page**

Hovering a link shows the URL your browser is about to open, which is enough for a quick check. Copying the link address is the reliable test, because it shows exactly what AutoTag wrote into the `href`.
</Callout>

## Where the Chain Breaks

Almost every "my affiliate conversions are not attributed" case is one of these. The symptom in the [Events Log](/docs/integration-event-log) is usually the same — a missing or unknown `click_id` — but the cause sits at a specific hop.

| Hop | What goes wrong | Fix |
|-----|-----------------|-----|
| 1 | The Tracking Tag is not on the page carrying the link, is placed in `body` instead of `head`, or is blocked by a privacy extension. No tag, no Click ID. | Follow [Install the AnyTrack Tag](/docs/install-anytrack-tag) and confirm the tag fires on that exact page |
| 2 | The link is not a standard `a` element — it is a button that redirects with JavaScript. AutoTag cannot tag what it cannot see. | Convert it to a standard anchor tag, or handle it as a [link added after page load](/docs/links-added-after-page-load) |
| 2 | The link is added to the page after load, for example an offer button revealed when a video ends. | See [Links Added After Page Load](/docs/links-added-after-page-load) |
| 2 | The link is rendered inside an embedded video player's iframe, where AutoTag cannot reach it. | Put the Click ID on the page URL with [`atclidToUrl`](/docs/append-click-id-to-url) so the player carries it through |
| 2 | The network is not in the [Integration Catalog](/docs/integration-catalog), so AutoTag does not know which parameter to use. | Add the `--CLICK-ID--` token yourself: `?sub1=--CLICK-ID--` |
| 2 | AutoScan matched the link to the wrong integration, or to none — the page shows **No elements detected (X found)**. | Open **VIEW RESULTS** in [AutoScan](/docs/autoscan) and assign the correct integration |
| 2→3 | A link shortener, click tracker, or redirect script rebuilds the destination URL and drops the parameter. | Remove the shortener, or configure the redirect to pass the full query string through |
| 3 | The parameter name is right for a different network, so the value lands in a field the network ignores. | Check the parameter for your network in [Tracking Group ID](/docs/tgid) |
| 5 | The Postback URL in the network does not match the one AnyTrack generated, or was paused or reset. | Copy the current Postback URL from the integration settings and re-save it in the network |
| 5 | The postback token for the SubID field is wrong, so the network sends an empty `click_id`. | Match the token to your network's syntax, for example `${sub1}`, `{clickid}`, or `#s2#` |

<Callout icon="📘" theme="info">
**Conversions from before you installed the tag**

Traffic that was never tracked by the Tracking Tag has no Click ID to return. Those conversions arrive without a `click_id` and cannot be attributed. This is expected right after connecting an integration, and it clears itself as new tracked traffic converts.
</Callout>

## What the Click ID Is Not Responsible For

The Click ID connects a conversion to a click. It does not carry campaign names. Campaign attribution comes from the UTM parameters and the ad platform click ID collected at step 1 — the Click ID is what lets AnyTrack find them again later. Both matter: without the Click ID the conversion is orphaned, and without UTM parameters the campaign is unnamed.

***

<FaqAccordion
  title="FAQ & Troubleshooting"
  items={[
    {
      question: "Where exactly does the Click ID get added to my affiliate link?",
      answer: "On your own page, in the visitor's browser, before they click. The <a href='/docs/anytrack-tag'>Tracking Tag</a> writes the Click ID into the link's href, so the visitor navigates to a URL that already carries it. Nothing is added after they leave your site."
    },
    {
      question: "My affiliate link already has a SubID value. Will AutoTag overwrite it?",
      answer: "No. If the link already carries a SubID parameter with a custom value, such as <code>sid=mybanner</code>, AutoTag merges the Click ID with the existing value instead of replacing it. Your original value is preserved."
    },
    {
      question: "Do I need a postback for every network?",
      answer: "You need a way for the network to notify AnyTrack when a conversion happens. Networks in the <a href='/docs/integration-catalog'>Integration Catalog</a> come with a preconfigured Postback URL — you copy it into the network. For anything else, build a <a href='/docs/custom'>Custom Integration</a> and map the tokens yourself."
    },
    {
      question: "The conversion shows in my affiliate network but not in AnyTrack. Where do I look?",
      answer: "Open the integration's <a href='/docs/integration-event-log'>Events Log</a>. If the conversion is not there at all, the postback never reached AnyTrack — check that the Postback URL is set and active in the network. If it is there but shows a missing or unknown <code>click_id</code>, the chain broke earlier, at hop 2 or 3: the link was not tagged, or something stripped the parameter on the way to the network."
    },
    {
      question: "Can I use a link shortener or a pretty link on a tagged affiliate link?",
      answer: "Only if every hop passes the full query string through to the final destination. Shorteners like bit.ly strip tracking parameters and break the handoff. Redirect plugins can work — <a href='/docs/autoscan'>AutoScan</a> resolves the final destination for plugins such as ThirstyAffiliates — but you must verify by copying the link address and following the redirect chain in your browser's network tab."
    },
    {
      question: "How long does the Click ID stay valid?",
      answer: "For the duration of the attribution window configured in your Property Settings — 1, 7, 30 days, or maximum. A postback arriving inside that window is attributed to the original ad click."
    },
    {
      question: "Does the affiliate network see which ad my traffic came from?",
      answer: "No. The network only receives the Click ID, which is an anonymous alphanumeric string. Your campaign, ad set, and traffic source data stay in AnyTrack and are re-attached when the postback comes back."
    }
  ]}
/>

## Related

- [AnyTrack Click ID](/docs/anytrack-click-id)
- [AutoTag](/docs/autotag)
- [Links Added After Page Load](/docs/links-added-after-page-load)
- [SubID Parameter Guide](/docs/the-subid-parameter-and-its-role-in-affiliate-tracking)
- [Postback URL Integration](/docs/custom)
- [Tracking Group ID](/docs/tgid)
- [Troubleshooting Integrations](/docs/troubleshooting-integrations)
