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

# Track Clicks

> Manually capture and track click IDs with the AdsCrush SDK

The SDK automatically captures the click ID (`tid`) from your URL. Use these methods for manual control.

## Auto-Capture (Default)

When the SDK loads, it automatically looks for `?tid=...` in the URL and stores it.

## Manual Set

```javascript theme={null}
AdsCrushSDK.setClickId('abc-123-def-456')
```

## Get Click ID

```javascript theme={null}
const clickId = AdsCrushSDK.getClickId()
console.log(clickId) // "abc-123-def-456" or null
```

## Custom Parameter Name

Rarely needed: the SDK reads `clickid`, then `tid` out of the box. To use a
different parameter (or order), pass a string or an ordered list:

```html theme={null}
<script>
  window.adscrushConfig = {
    paramName: ['clickid', 'tid']
  }
</script>
<script src="https://sdk.adscrush.com/v1/index.iife.min.js"></script>
```

Only UUID-shaped values are accepted from the URL — anything else is skipped,
so unrelated numeric IDs never get stored.

## Check If Already Tracked

```javascript theme={null}
if (AdsCrushSDK.hasTrackedConversion('purchase')) {
  console.log('Already tracked')
}
```

**See also:** [Track Conversions](/sdk/track-conversion) · [Track Leads](/sdk/track-lead) · [API Reference](/sdk/api-reference)


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