# AutoTag

> Learn how AutoTag automatically appends AnyTrack Click IDs to every link, form, and checkout redirect on your site. Covers supported platforms, SubID parameter mapping, the AutoTag token for custom links, and how automatic parameter injection eliminates manual UTM configuration and prevents lost attribution.

AutoTag automatically appends the AnyTrack Click ID to every external link, form submission, and checkout redirect on your site — before the user clicks. No manual parameter building, no spreadsheets of UTM templates, no hoping developers remember to add tracking codes.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "The Tracking Tag is installed on your website", done: true },
    { label: "Links on your page are published as regular HTML anchor tags, not generated by JavaScript", done: true },
    { label: "You have an active AnyTrack property", done: true },
  ]}
/>

The Tracking Tag detects trackable elements and injects the correct parameters automatically. Affiliate links get the right SubID format for each network (`s1`–`s5` for ClickBank, `tid` for CJ, `subid` for Impact). Forms capture Click IDs in hidden fields. External checkouts carry session data through redirects.

## How AutoTag Works

When the Tracking Tag loads on your page, it scans for links, forms, and redirects. For each trackable element, AutoTag:

1. Identifies the destination platform
2. Determines the correct parameter name for that platform
3. Appends the AnyTrack Click ID using that parameter

This happens client-side, in real time, before the visitor interacts with the element.

## Platform Parameter Mapping

AutoTag adjusts the tracking parameter to match each platform's requirements:

| Platform | Parameter | Example URL |
|----------|-----------|-------------|
| [ClickBank](/docs/clickbank) | `tid` | `https://example.com/?tid=p8qkMansHXKG046vYzCCof5VUYvAJC` |
| [Rakuten](/docs/rakuten) | `u1` | `https://example.com/?u1=p8qkMansHXKG046vYzCCof5VUYvAJC` |
| [CJ Affiliates](/docs/cj) | `sid` | `https://example.com/?sid=p8qkMansHXKG046vYzCCof5VUYvAJC` |
| [Calendly](/docs/calendly) | `utm_term` | `https://calendly.com/?utm_term=p8qkMansHXKG046vYzCCof5VUYvAJC` |

For a full list of SubID parameter names by platform, see [The SubID Parameter](/docs/the-subid-parameter-and-its-role-in-affiliate-tracking).

## AutoTag Token

For links where AutoTag cannot auto-detect the correct parameter, use the `--CLICK-ID--` token. Add it as the value of any parameter, and the Tracking Tag replaces it with the actual Click ID at page load:

```html
<a href="https://example.com/?mycustomid=--CLICK-ID--">
    Custom Tracked Link
</a>
```

This is useful for custom integrations, non-standard affiliate platforms, or any link where you need the Click ID in a specific parameter.

## Edge Case: Merging With Existing Parameters

If a link already has a SubID parameter with a custom value (e.g., `sid=mybanner`), AutoTag merges the Click ID with the existing value rather than overwriting it. The original value is preserved alongside the AnyTrack Click ID.

***

<FaqAccordion
  title="FAQ & Troubleshooting"
  items={[
    {
      question: "What is a Click ID?",
      answer: "A Click ID is a unique alphanumeric identifier generated by AnyTrack for every visitor session. Example: p8qkMansHXKG046vYzCCof5VUYvAJC. It connects a visitor's click to their downstream conversion, enabling accurate attribution. Learn more about SubID parameters and Click IDs."
    },
    {
      question: "Does AutoTag work with all affiliate networks?",
      answer: "Yes. AutoTag automatically adjusts to platform-specific parameters like tid for ClickBank, u1 for Rakuten, and sid for CJ Affiliates. For platforms not in the built-in mapping, use the --CLICK-ID-- token in your link."
    },
    {
      question: "Can I use AutoTag with custom parameters?",
      answer: "Yes. Add the token --CLICK-ID-- as the value of any URL parameter, and AutoTag replaces it with the actual Click ID at page load. For example: https://example.com?mycustomid=--CLICK-ID--. See Custom Event Triggers for more advanced tracking options."
    },
    {
      question: "Do I need coding experience to use AutoTag?",
      answer: "No. Once the Tracking Tag is installed on your site, AutoTag runs automatically. For custom links that need the --CLICK-ID-- token, you only need to edit the link URL."
    },
    {
      question: "What happens if my link already has a SubID value?",
      answer: "AutoTag merges the Click ID with your existing SubID value rather than overwriting it. Your original parameter value is preserved."
    }
  ]}
/>

## Related

- [SubID parameters and Click IDs](/docs/the-subid-parameter-and-its-role-in-affiliate-tracking)
- [ClickBank integration](/docs/clickbank)
- [Rakuten integration](/docs/rakuten)
- [CJ Affiliates integration](/docs/cj)
- [Custom Event Triggers](/docs/custom-event-triggers)
