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

# Click Attribution

> How clicks and conversions are attributed to messages

Attribution connects revenue back to the messages and offers that drove it. Understand how Trackly tracks the customer journey.

## Attribution Model

Trackly uses **first-click attribution**:

* The first click on a message gets credit for conversions
* Subsequent clicks are tracked but not counted as new engagements
* Conversions within the attribution window are linked to that click

## Attribution Window

The attribution window defines how long after a click a conversion can be attributed:

```
Click at 10:00 AM
Conversion at 3:00 PM same day → Attributed ✓
Conversion at 90 days later → Still attributed (within partnership lookback window)
```

The partnerships conversion handler uses a **90-day lookback window** for click lookup. Individual partnership offers can configure a custom `click_window_days` for tighter attribution.

## How It Works

<Steps>
  <Step title="Message sent">
    Message with tracked link sent to contact
  </Step>

  <Step title="Contact clicks">
    Click recorded with timestamp
  </Step>

  <Step title="Contact converts">
    Purchase/conversion on advertiser site
  </Step>

  <Step title="Conversion synced">
    Conversion data synced from affiliate platform
  </Step>

  <Step title="Attribution matched">
    System matches conversion to original click
  </Step>

  <Step title="Revenue credited">
    Message, creative, and offer credited with revenue
  </Step>
</Steps>

## Attribution Types

| Type              | Description                          |
| ----------------- | ------------------------------------ |
| **Direct**        | Click → immediate conversion         |
| **Click-through** | Click → conversion within window     |
| **View-through**  | Message sent → conversion (no click) |

<Info>
  **Coming Soon** — View-through attribution is not yet implemented. The data model supports it, but currently only click-through attribution is active.
</Info>

## What Gets Credited

When a conversion is attributed, credit flows to:

* **Message**: The specific sent message
* **Creative**: The template used
* **Offer**: The offer that was clicked
* **Contact**: The contact who converted
* **Campaign**: The schedule that sent it

## Revenue Metrics

### Per Message

```
Message ID: msg_abc123
Sent to: +1***1234
Clicked: Yes
Conversions: 1
Revenue: $24.99
```

### Per Creative

```
Creative: "Summer Sale 20%"
Total sends: 10,000
Total clicks: 1,200
Conversions: 48
Revenue: $1,152
Revenue per send: $0.12
```

### Per Offer

```
Offer: Summer Clearance
Messages: 50,000
Clicks: 6,000
Conversions: 240
Revenue: $5,760
EPC: $0.96
```

## Multi-Touch Considerations

If a contact clicks multiple messages before converting:

```
Monday: Clicks Message A
Wednesday: Clicks Message B
Friday: Converts

Attribution: Message A (first click)
```

First click wins. Message B is tracked but not credited.

## Syncing Conversions

Conversions come from:

### Affiliate Platforms

TUNE, Everflow, and other platforms send conversion postbacks:

```
Postback: conversion_id=123, payout=$25, click_id=abc
```

Trackly matches `click_id` to the original click.

### Manual Import

<Info>
  **Coming Soon** — CSV conversion import is not yet available. Conversions are currently tracked automatically through platform integrations.
</Info>

## Viewing Attribution

### In Reports

The Performance Report shows:

* Revenue by creative
* Revenue by offer
* Revenue by date
* Revenue by campaign

### In Message Detail

Click on a message to see:

* Was it clicked?
* Did it convert?
* Revenue attributed

### In Contact Profile

See a contact's journey:

* Messages received
* Clicks
* Conversions
* Total revenue

## Troubleshooting

<AccordionGroup>
  <Accordion title="Conversion not attributed">
    Check:

    * Was the click within the attribution window?
    * Does the click\_id match?
    * Was the conversion already attributed elsewhere?
  </Accordion>

  <Accordion title="Revenue seems off">
    Verify:

    * Conversion sync is working
    * Payout amounts are correct
    * Attribution window is appropriate
  </Accordion>

  <Accordion title="Missing conversions">
    Ensure:

    * Postback URLs are configured correctly
    * Click IDs are being passed through
    * Platform is sending postbacks
  </Accordion>
</AccordionGroup>

## Best Practices

<AccordionGroup>
  <Accordion title="Set appropriate windows">
    Longer windows capture more conversions but may over-attribute. 7-14 days is typical.
  </Accordion>

  <Accordion title="Verify postback setup">
    Test with a manual conversion to ensure attribution flows correctly.
  </Accordion>

  <Accordion title="Compare to platform data">
    Cross-reference Trackly revenue with your affiliate platform totals.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Offers" icon="tag" href="/guides/offers/overview">
    Manage offers and payouts
  </Card>

  <Card title="TUNE Integration" icon="plug" href="/guides/offers/tune-integration">
    Sync with TUNE/HasOffers
  </Card>
</CardGroup>
