> ## 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.

# Link Tracking Overview

> Track clicks and attribute revenue to your messages

Trackly SMS automatically tracks link clicks in your messages, providing insights into engagement and revenue attribution.

## How It Works

1. **URLs are shortened**: Links in your messages become trackable short URLs
2. **Clicks are logged**: When recipients click, we record the event
3. **Redirect happens**: User is sent to the original destination
4. **Attribution flows**: Clicks are linked to messages, offers, and revenue

```
Message: "Shop now: yourdomain.com/abc123"
                    ↓
            Contact clicks
                    ↓
            Click recorded
                    ↓
         Redirect to destination
                    ↓
         Revenue attributed (if conversion)
```

<Note>
  Tracking domains are configured per-account in **Account Settings**. There is no default shared domain — each account sets up its own tracking domain. See [Link Tracking Domains](/account/link-tracking-domains) for DNS setup instructions.
</Note>

## What's Tracked

| Data Point          | Description               |
| ------------------- | ------------------------- |
| **Click timestamp** | When the click occurred   |
| **Message ID**      | Which message was clicked |
| **Offer**           | Which offer was linked    |
| **Contact**         | Who clicked               |
| **IP address**      | For bot detection         |
| **User agent**      | Browser/device info       |

## Short Links

### URL Format

Short links use your account's configured tracking domain:

```
yourdomain.com/abc123
yourbrand.link/def456
```

Tracking domains are configured per-account in **Account Settings**. Each account sets up its own domain.

### Link IDs

Each link gets a unique 7-character ID:

* Randomly generated
* Unique per message
* Includes the offer binding

### Multiple Links

Messages can have multiple tracked links:

```
"Clothing sale: {{link1}}
Electronics: {{link2}}"
```

Each link is tracked separately.

## Click Recording & First-Click Attribution

Trackly records every click and uses first-click attribution for analytics:

1. **All clicks** create a `MessageShortLinkClick` record — every click is logged regardless of whether it is a first click or a repeat
2. Only the **first non-bot click** per contact per message creates a `MessageClick` record, which is used for revenue attribution and reporting
3. Subsequent clicks are still recorded as `MessageShortLinkClick` entries but do not generate additional `MessageClick` records
4. Revenue is attributed to the first `MessageClick`

<Note>
  Reports and revenue attribution are based on `MessageClick` records (first non-bot click only). Raw click data (`MessageShortLinkClick`) captures all clicks including repeats and bots.
</Note>

## Click Confirmation

Clicks are confirmed immediately:

* Real-time logging
* Instant redirect
* No noticeable delay

## Interstitial Pages

When an offer has an interstitial configured, the link tracking service shows an intermediate landing page before redirecting to the destination. Three modes:

| Mode           | Behavior                                                                             |
| -------------- | ------------------------------------------------------------------------------------ |
| `custom`       | Offer-specific interstitial with configurable title, description, CTA, and meta tags |
| `list_default` | Uses the sending list's default interstitial template                                |
| `none`         | Direct redirect (no interstitial)                                                    |

Interstitials help with compliance messaging, bot filtering, and pre-sell content.

## Self-Hosted Conversion Tracking

The link tracking service provides three conversion endpoints that don't require an external affiliate platform:

| Endpoint                   | Description                                                                             |
| -------------------------- | --------------------------------------------------------------------------------------- |
| `GET /conv`                | Standard postback with `link_id`, `event`, `revenue`, `txn_id`                          |
| `GET /conv/offer`          | Direct offer-level postback (bypasses need for prior click, requires `postback_secret`) |
| `GET /pixel/<link_id>.gif` | 1x1 transparent GIF pixel for image-tag tracking                                        |

Conversions are deduplicated by `txn_id`.

## Use Cases

<CardGroup cols={2}>
  <Card title="Engagement Tracking" icon="chart-line">
    See which messages get clicks
  </Card>

  <Card title="A/B Testing" icon="flask">
    Compare click rates across variants
  </Card>

  <Card title="Revenue Attribution" icon="dollar-sign">
    Link sales back to specific messages
  </Card>

  <Card title="Audience Building" icon="users">
    Create segments based on click behavior
  </Card>
</CardGroup>

## Reporting

### Message-Level

See clicks per message:

* Total clicks
* Unique clicks
* Click rate (clicks / sent)

### Offer-Level

See clicks per offer:

* Which offers get the most engagement
* Revenue per offer

### Creative-Level

See clicks per creative:

* Compare performance across templates
* Identify top performers

## Link Tracking + Offers

When you bind an offer to a link:

```
{{link1}} → Summer Sale Offer
```

Clicks and conversions are attributed to that offer, enabling:

* Offer performance comparison
* Revenue tracking per offer
* Payout calculation

## Privacy & Compliance

<AccordionGroup>
  <Accordion title="Data collected">
    We collect:

    * Click timestamp
    * IP address (for bot detection)
    * User agent (for bot detection)
    * Message/contact association
  </Accordion>

  <Accordion title="Data retention">
    Click data is retained according to your account settings and our data retention policy.
  </Accordion>

  <Accordion title="Opt-out links">
    Opt-out/STOP links are not tracked to ensure compliance. STOP functionality always works.
  </Accordion>
</AccordionGroup>

## Common Pitfalls

<Accordion title="Why are my click counts inflated?">
  Inflated click counts typically come from automated link scanning:

  * **Bot detection**: Carrier and email security bots pre-fetch links to scan for malware. Enable bot detection in your list settings to filter these out.
  * **Raw vs. unique clicks**: The dashboard shows both raw (every click) and unique (per-contact) metrics. If you see high raw counts but normal unique counts, bots are likely the cause.
  * **Link preview crawlers**: Some messaging apps generate link previews by fetching the URL. These appear as clicks but are not from real users.
  * **Solution**: Check the "Bot Clicks" column in your reporting dashboard. If bot percentage is high, review your bot detection configuration under List Settings > Link Tracking.
</Accordion>

## Next Steps

<CardGroup cols={2}>
  <Card title="Bot Detection" icon="robot" href="/guides/link-tracking/bot-detection">
    Filter out automated clicks
  </Card>

  <Card title="Attribution" icon="arrow-right" href="/guides/link-tracking/attribution">
    How revenue is attributed
  </Card>
</CardGroup>
