> ## Documentation Index
> Fetch the complete documentation index at: https://soran.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# URL tagging

> Tag your ad URLs so clicks join exactly to the ad that caused them.

Pulling ad spend tells Soran what you spent. Tagging your ad URLs tells Soran
*which ad* each visitor clicked — an identity rather than a name match, which is
what makes per-ad ROAS trustworthy.

Soran adds three parameters. They are its own, so no ad platform will ever
overwrite them:

| Parameter | Holds |
| - | - |
| `sor_source` | The surface the ad rendered on. |
| `sor_adid` | The ad's id. This is the exact join. |
| `sor_cid` | The campaign's id. |

## Meta

Paste this into **Meta Ads Manager → Tracking → URL parameters**:

```text theme={null}
sor_source={{site_source_name}}&sor_adid={{ad.id}}&sor_cid={{campaign.id}}
```

Meta expands `{{…}}` on the click, so this one string serves every ad in the
account. To apply it across existing ads, use **Edit** in bulk.

## TikTok

TikTok has no URL-parameters field. Add this to the **end of** the destination
URL, under **TikTok Ads Manager → Ad details → Destination URL**, which is where
TikTok expands macros:

```text theme={null}
sor_source=__PLACEMENT__&sor_adid=__CID__&sor_cid=__CAMPAIGN_ID__
```

Join it to the URL with an `&` if the URL already has a `?`, and with a `?` if it
does not. To apply it in bulk, use **Edit destination link**.

> [!WARNING]
>
> TikTok's macro names are misleading, so copy the string exactly rather than
> reasoning about it. `__CID__` reads like "campaign id" but expands to the
> **ad's** id, and `__AID__` reads like "ad id" but expands to the **ad group**
> id. Swapping them books every click against the wrong level. Do not substitute
> `__ADID_V2__` either — it only fills on upgraded Smart+ campaigns and expands
> to nothing on the classic auction campaigns the reports read.

## Related

> **[Meta ads](/docs/integrations/meta-ads)**
>
> Connect Meta and pull its spend.

> **[TikTok ads](/docs/integrations/tiktok-ads)**
>
> Connect TikTok and pull its spend.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.