> AffiliateOS Help Center. Index of every article for AI tools: https://www.affiliateos.ai/help/llms.txt

# Pass your user ID and sub IDs on a tracking link

Offer Links and click tracking · For publishers, networks · Updated 4 November 2026
Web version: https://www.affiliateos.ai/help/links-and-tracking/pass-user-id-and-sub-ids

Put your user's ID in `sub_id` on every link: it comes back on every postback for that user, and it's how you know whom to credit. Add up to ten values of your own as `sub1` to `sub10`, and they come back on the postback too.

## The parameters

| Parameter | What to put in it | Limits | Back on your postback |
|---|---|---|---|
| `sub_id` | Your user's own ID. One user, one value, always the same. | Required. A link without it is refused. | Yes, as `sub_id` and the `{sub_id}` macro |
| `sub1` to `sub10` | Anything you want back: your own click ID, a sub-publisher, a placement. | Each up to 128 characters. An empty, repeated or longer one is ignored and the click still works. | Yes, as `sub1` to `sub10` and the `{sub1}` to `{sub10}` macros, only the ones the link carried |
| `device_id` | The phone's advertising ID: IDFA on iOS, GAID on Android. | Anything not in an advertising ID's shape, including an all-zero ID or an unfilled `{DEVICE_ID}`, is dropped and the click still works. | No. It helps advertisers confirm installs. |
| `subsource_id` | A label for where the link sits, URL-encoded. | Up to 128 characters. A longer or repeated one makes the click fail. | No. It's kept on the click record. If we've turned on sub-site reporting for your account, a short code also goes to the attribution link of our own apps' offers. |

## `sub_id`: your user, not your campaign

`sub_id` is the one value that tells you whose conversion it is. Give each user their own, and keep it the same for that user on every link and in every app.

- A shared value (a campaign name, `test`, the literal `{SUB_ID}`) puts every conversion on one "user" you can't credit.
- Use an ID, not an email address or a name: it travels in URLs and comes back in postbacks.
- On the [Hosted Offerwall](https://www.affiliateos.ai/help/offerwall/set-up-wall), the `uid` you open the wall with comes back as `sub_id`.

## `sub1` to `sub10`: your values back

Example: Pebble Rewards adds its own click ID and the screen the link sat on.

```text
https://click.affiliateos.ai/click?off_id=aff_ab12cd34ef56&pub_id=pub_7Hn2&partner_id=prt_Q81x&sub_id=u_48213&sub1=pr_clk_90211&sub2=home_banner
```

Every postback for that conversion, the credit and any later reversal, carries them back:

```text
https://api.pebble.example/afos?sub_id=u_48213&status=completed&sub1=pr_clk_90211&sub2=home_banner&...
```

Or place them where you want with [macros](https://www.affiliateos.ai/glossary#macro) in your postback URL: `?user={sub_id}&click={sub1}&screen={sub2}`. A macro for a value the link didn't carry comes back empty.

> **How sub1 to sub10 are matched.** We keep them for 90 days and match them to a conversion by your user's `sub_id` and the offer. If the same user tapped the same offer twice with different values, the postback carries the latest click's. Keep `sub_id` your user's ID and this always lines up. We never send these values to the advertiser.

## On the Hosted Offerwall

The wall builds its own links, so there's nothing to add: the `uid` comes back as `sub_id`, and `sub1` to `sub10` aren't used.

## For networks

Your publishers' links carry their own `partner_id`, so `sub_id` and `sub1` to `sub10` come back on their postbacks as above. Your network's own postbacks carry `sub_id` but never `sub1` to `sub10`, whichever link the tap came through.
