# AnyTrack Identifiers

> Understand every identifier AnyTrack uses to track and attribute conversions, from the Client ID and Click ID to refId, Property ID, and Tracking Group, plus the ad network click IDs AnyTrack collects and the fields that carry them across your marketing stack.

This page is the complete reference for the identifiers AnyTrack uses to connect a visitor, their actions, and the conversions they generate across your marketing stack.

If you want to understand how the Click ID stitches a customer journey together, see [AnyTrack Click ID](/docs/anytrack-click-id). If you want to send events without the Tracking Tag, see [Server-Side Client ID](/docs/generate-a-client-id-server-side).

## Quick reference

| Identifier | Parameter | What it identifies | Granularity |
| ---------- | --------- | ------------------ | ----------- |
| Client ID | `cid` | The visitor (anonymous) | One per visitor cookie |
| Page Click ID | `atclid` | The page session | One per page load (30 characters) |
| Click ID | `click_id` | A specific action or trackable element | One per link, form, or cart (34 characters) |
| External ID | `refId` | An external alias you control | One per customer record |
| Property ID | `{propertyid}` | The tracked website | One per AnyTrack property |
| Tracking Group | `tgid` | An integration or group of links | One per integration |

Quick mnemonic: `cid` is *who*, `atclid` is *which page*, `click_id` is *which action*, `refId` is *your own name for them*.

## Core identifiers

These four identifiers carry the visitor and their actions through AnyTrack.

| Identifier | Parameter | Definition | Where it is generated |
| ---------- | --------- | ---------- | --------------------- |
| Client ID | `cid` | A cookie ID that anonymously identifies the visitor. A 14-character alphanumeric string. | Set as a first-party cookie by the Tracking Tag, or minted server-side via the collect endpoint. |
| Page Click ID | `atclid` | A 30-character click ID for the current page session. Not tied to a specific element. | The Tracking Tag generates it when a page loads. |
| Click ID | `click_id` | A 34-character click ID for a specific trackable element (a link, form, or cart) or a server-side event. The 4 characters added to the `atclid` identify the element. This is the value that travels between platforms. | The Tracking Tag appends it per element through AutoTag. Server-side it is the Property ID joined to the `cid`: `{propertyid}{cid}`. |
| External ID | `refId` | An external alias for a `cid`, such as an email, phone number, or your own customer ID. | You supply it when the `click_id` cannot reach a destination such as a CRM. |

> 📘 **Client ID vs Click ID**
>
> The `cid` identifies the visitor. The `click_id` identifies an action that visitor performed. Every event attribute (customer data, transaction details, product data) attaches to the `click_id`, not the `cid`.

## Structural identifiers

These identifiers describe your account setup rather than a single visitor.

| Identifier | Parameter | Definition |
| ---------- | --------- | ---------- |
| Property ID | `{propertyid}` | Identifies the property (website) being tracked. It forms the prefix of every Click ID. |
| Tracking Group | `tgid` | References an integration or a group of links so [AutoTag](/docs/autotag) knows which links and forms to append the Click ID to. Examples: `typeform`, `ghl`. |

## How the Click ID is structured

The AnyTrack Click ID is composed of three strings that let AnyTrack rebuild the visitor timeline:

| Property unique identifier | Visitor unique identifier | Encrypted key |
| -------------------------- | ------------------------- | ------------- |
| `IBTO9lOfAMybr` | `KiiB1U9YG91IF` | `js3Dv9AV` |

The full value looks like `IBTO9lOfAMybrKiiB1U9YG91IFjs3Dv9AV`. The page-level `atclid` is the first 30 characters. A `click_id` extends it to 34 characters, where the final 4 characters identify the specific element (such as an affiliate link or a form). In server-side setups, the Click ID is the Property ID concatenated with the `cid` you generated: `{propertyid}{cid}`.

## Where identifiers are generated

### Client-side (Tracking Tag)

When the [Tracking Tag](/docs/anytrack-tag) runs in the browser, it sets the `cid` cookie, generates the `atclid` for the page, and appends a `click_id` to each trackable element through AutoTag.

> 📘 **Note**
>
> `PageView` is the only standard event that does not generate a `click_id` by default. See [Standard Conversions](/docs/standard-events) for the full event list.

### Server-side (collect endpoint)

When the Tracking Tag cannot run (Facebook Lead Ads, offline conversions, headless checkouts, or a contact created directly inside a CRM), AnyTrack creates the session server-side. You generate a 14-character `cid`, send a `PageView` to the collect endpoint, and the `click_id` becomes `{propertyid}{cid}`. See [Server-Side Client ID](/docs/generate-a-client-id-server-side) for the full payload.

> ❗ **HubSpot CRM contacts**
>
> When a contact is created directly in the HubSpot CRM interface, the AnyTrack app for HubSpot generates a server-side Client ID for that contact. This lets AnyTrack track the contact even though no browser session existed at creation.

## How the Click ID travels

A Click ID moves through four stages. A single platform can act at more than one stage.

1. **Generation** — the Tag (client-side) or the collect endpoint (server-side) creates the identifier.
2. **Propagation** — AutoTag appends the Click ID to links and embeds, a hidden form field or action URL carries it through the `--CLICK-ID--` token, or an integration (or Zapier or Make) passes it along.
3. **Landing** — the destination stores the Click ID value in a field, such as a CRM contact property.
4. **Matching** — the conversion returns to AnyTrack through a native integration event or a webhook, and AnyTrack matches it back to the original session by the `click_id`, or by the `refId` when the `click_id` could not travel.

For example, a [Typeform](/docs/typeform) embed receives the Click ID when the page loads (a destination), then returns the conversion on submit (a source).

## Fields that carry the Click ID value

Each platform stores the Click ID value in its own field. These field names are not new identifiers. They hold the same Click ID value.

| Platform | Field | Naming |
| -------- | ----- | ------ |
| Typeform | `at_click_id` | Fixed by the integration |
| GoHighLevel and Elementor | `_atid` | Fixed by the integration |
| HubSpot | AnyTrack Click ID (contact property) | Fixed by the integration |
| Generic HTML form | Any name you choose, carrying the `--CLICK-ID--` token value | Free |

> 📘 **HubSpot**
>
> Map the AnyTrack Click ID into the AnyTrack Click ID contact property as shown in the [HubSpot integration](/docs/hubspot) guide.

## Ad platform identifiers

### Identifiers AnyTrack collects

AnyTrack reads each ad platform click ID, plus the platform client-side identifiers when present (for example, the Meta `fbp` and `fbc` cookies and the Google Analytics client ID `_ga`). These belong to the ad platforms. They feed into the AnyTrack Click ID. They do not replace it.

| Click ID | Network |
| -------- | ------- |
| `gclid` | Google Ads |
| `fbclid` | Facebook Ads |
| `ttclid` | TikTok Ads |
| `msclkid` | Microsoft Ads |

### The identifier AnyTrack sends back

To raise [Event Match Quality](/docs/facebook-event-match-quality), AnyTrack sends the AnyTrack Client ID to each platform as that platform matching identifier through [Conversion API](/docs/conversion-api):

| Network | AnyTrack Client ID sent as |
| ------- | -------------------------- |
| Facebook Ads | `external_id` |
| Google Ads | `user_id` |
| TikTok Ads | `external_id` |

<FaqAccordion
  title="AnyTrack Identifiers FAQ"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "What is the difference between the Client ID and the Click ID?",
      answer: "The Client ID (<code>cid</code>) is a cookie that identifies the visitor. The Click ID (<code>click_id</code>) identifies an action that visitor performed, and it is the value that travels between platforms. In server-side setups, the Click ID is the Property ID joined to the <code>cid</code>: <code>{propertyid}{cid}</code>."
    },
    {
      question: "What is the difference between atclid and click_id?",
      answer: "The <code>atclid</code> is the 30-character Click ID for the whole page session, generated once when the page loads. The <code>click_id</code> is 34 characters: it extends the <code>atclid</code> with 4 characters that identify a specific element, so each link, form, or cart gets its own value."
    },
    {
      question: "When does AnyTrack generate a Click ID server-side?",
      answer: "Whenever the Tracking Tag cannot run: Facebook Lead Ads, offline conversions, headless checkouts, and contacts created directly inside a CRM. Creating a contact in the HubSpot interface, for example, triggers the AnyTrack app for HubSpot to generate a server-side Client ID. See <a href='/docs/generate-a-client-id-server-side'>Server-Side Client ID</a>."
    },
    {
      question: "When should I use refId instead of the click_id?",
      answer: "Use <code>refId</code> when the <code>click_id</code> cannot be passed to a destination such as a CRM. It aliases the visitor by an external value you control, like an email or your own customer ID, so later events identified by that value match back to the same visitor. See <a href='/docs/external-id-as-click-id'>External ID as Click ID</a>."
    },
    {
      question: "What identifier does AnyTrack send to Meta and Google for matching?",
      answer: "AnyTrack sends the AnyTrack Client ID to each ad platform as that platform matching identifier: <code>external_id</code> for Facebook Ads and TikTok Ads, and <code>user_id</code> for Google Ads. This raises Event Match Quality on conversions sent through Conversion API."
    },
    {
      question: "Do I need to set up these identifiers manually?",
      answer: "No. For standard integrations in the catalog, AnyTrack generates and passes the identifiers automatically. Manual work is only needed for custom platforms or advanced cross-platform setups."
    }
  ]}
/>

<Cards columns={2}>
  <Card title="AnyTrack Click ID" href="/docs/anytrack-click-id" icon="fa-link" iconColor="green-500">
    How the Click ID connects every touchpoint in the customer journey.
  </Card>
  <Card title="Server-Side Client ID" href="/docs/generate-a-client-id-server-side" icon="fa-server" iconColor="green-500">
    Generate a Client ID and track conversions without the Tracking Tag.
  </Card>
  <Card title="External ID as Click ID" href="/docs/external-id-as-click-id" icon="fa-id-badge" iconColor="green-500">
    Alias a visitor with refId when the Click ID cannot reach your CRM.
  </Card>
  <Card title="Event Attributes" href="/docs/event-attributes" icon="fa-tags" iconColor="green-500">
    The customer, product, and transaction data attached to each Click ID.
  </Card>
</Cards>
