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

# Bot Detection

> Filter automated clicks from your analytics

Not all clicks are human. Security scanners, link previewers, and bots can inflate your click metrics. Trackly helps you filter these out.

## The Problem

When you send an SMS with a link, various automated systems may click it:

| Source               | Why They Click     |
| -------------------- | ------------------ |
| **Carrier scanners** | Check for malware  |
| **Security tools**   | Verify link safety |
| **Link previewers**  | Generate previews  |
| **Crawlers**         | Index content      |

These automated clicks can:

* Inflate click rates
* Skew analytics
* Misattribute conversions

## How Bot Detection Works

Trackly analyzes clicks server-side for bot signatures:

1. **IP / ISP / ASN analysis**: Known bot IP ranges and datacenter IPs
2. **User-Agent patterns**: Bot-like user agent strings
3. **Country-based filtering**: Clicks from countries on the `BAD_COUNTRIES` list are blocked

## Bot Filter Modes

Configure how to handle suspected bots:

### No Filter (Recording Only)

```
Mode: no_filter
```

* All clicks are recorded normally
* Bot classification still runs (UA analysis, IP/ISP lookup, country check)
* However, detected bots are redirected normally instead of seeing a preview page
* All clicks (bot and human) count toward metrics
* Redirect to destination immediately

### Preview Page Filter

```
Mode: filter (with preview page)
```

* Show a preview/confirmation page
* Human clicks "Continue" to proceed
* Bots typically don't interact
* Only confirmed clicks are counted

## Configuring Bot Filtering

### Account Level

Set the default for your account:

1. Go to **Account Settings > Messaging**
2. Select **Bot Filter Mode**
3. Save

### Offer Level

Override for specific offers:

1. Edit the offer
2. Set **Bot Filter Mode**
3. Save

Offer-level settings override account defaults.

## Preview Page

When using preview page filtering:

```
Message link → yourdomain.com/abc123
                    ↓
            Preview page loads
            "Click to continue to [brand]"
                    ↓
            Human clicks continue
                    ↓
            Click recorded as confirmed
                    ↓
            Redirect to destination
```

### Preview Page Customization

The preview page shows:

* A brief message
* "Continue" button
* Optional branding

<Note>
  Preview pages add friction. Use them for high-value offers where accuracy matters most.
</Note>

## Viewing Bot Data

### In Reports

Reports show:

* **Total clicks**: All clicks including bots
* **Confirmed clicks**: Human-verified clicks
* **Bot clicks**: Filtered bot clicks

### In Exports

Export data includes click records. Bot-filtered clicks are excluded from exports when using preview page filtering.

## When to Use Each Mode

<Tabs>
  <Tab title="No Filter">
    Best for:

    * Low-stakes tracking
    * When speed matters most
    * Testing and development
    * High-volume, low-value offers
  </Tab>

  <Tab title="Preview Page">
    Best for:

    * High-value conversions
    * Accurate revenue attribution
    * When you're seeing high bot rates
    * Compliance-sensitive campaigns
  </Tab>
</Tabs>

## Bot Detection Signals

We look for:

| Signal                | Indicates                                  |
| --------------------- | ------------------------------------------ |
| Known bot user agents | Crawlers, scanners                         |
| Datacenter IPs / ISPs | Automated systems                          |
| ASN analysis          | Cloud provider and hosting networks        |
| `BAD_COUNTRIES` list  | Clicks from blocked countries are filtered |

## Impact on Metrics

With bot filtering:

```
Without filtering: 20% click rate (inflated)
With filtering: 12% click rate (accurate)
```

Your true engagement is likely lower than raw numbers suggest.

## Best Practices

<AccordionGroup>
  <Accordion title="Start with no_filter">
    Collect data first to understand your bot rate before adding friction.
  </Accordion>

  <Accordion title="Monitor bot rates">
    If bot clicks exceed 30-40% of total, consider preview page filtering.
  </Accordion>

  <Accordion title="Test preview pages">
    Ensure the preview page works on various devices before broad deployment.
  </Accordion>

  <Accordion title="Consider offer value">
    High-payout offers benefit most from accurate tracking. Low-value may not need it.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Click rate seems too high">
    Enable bot filtering. Compare filtered vs unfiltered rates.
  </Accordion>

  <Accordion title="Preview page not showing">
    Check that bot filter mode is set correctly for the offer.
  </Accordion>

  <Accordion title="False positives (humans marked as bots)">
    Some VPN users may be flagged. Monitor for patterns and adjust if needed.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Revenue Attribution" icon="dollar-sign" href="/guides/link-tracking/attribution">
    How conversions are tracked
  </Card>

  <Card title="Offers" icon="tag" href="/guides/offers/overview">
    Manage your offers
  </Card>
</CardGroup>
