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

# Revenue Tracking

> Track conversions and attribute revenue to messages

Revenue tracking connects sales back to the messages that drove them. Understand your ROI and optimize for performance.

## How Revenue Flows

<Steps>
  <Step title="Message with offer sent">
    Contact receives message with tracked offer link
  </Step>

  <Step title="Contact clicks">
    Click is recorded with unique click\_id
  </Step>

  <Step title="Contact converts">
    Makes purchase on advertiser site
  </Step>

  <Step title="Postback received">
    Affiliate platform sends conversion data
  </Step>

  <Step title="Revenue attributed">
    Trackly matches conversion to click → message → creative
  </Step>
</Steps>

## Revenue Sources

Revenue can enter Trackly through five attribution methods:

| Method              | Description                                                                                                             |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TUNE Sales Sync** | Hourly sync via `Report/getConversions` API with 7-day lookback                                                         |
| **Direct Postback** | `GET /conv/offer` — server-to-server postback with `offer_id`, `message_id`, `revenue`, `txn_id`, and `postback_secret` |
| **Click-Based**     | `GET /conv` — postback with `link_id` from a prior click, resolving to the original message                             |
| **Pixel-Based**     | `GET /pixel/<link_id>.gif` — 1x1 transparent GIF for image-tag tracking                                                 |
| **Coupon-Based**    | `GET /conv/coupon` — clickless attribution using a coupon code                                                          |

### Affiliate Platforms

* **TUNE/HasOffers**: Hourly sync of offers and conversions
* **Everflow**: Offer and affiliate data sync (conversions via partnership endpoints)
* **Cake**: Offer and affiliate data sync (conversions via partnership endpoints)

### Conversion Event Types

The conversion handler supports: `lead`, `sale`, `rebill`, `refund`, `chargeback`, `install`, `signup`. Conversions are deduplicated by `external_id`.

* Timestamp

### Manual Entry

<Info>
  **Coming Soon** — CSV revenue import is not yet available. Revenue is currently tracked automatically through platform integrations (TUNE, Everflow, Cake).
</Info>

## Revenue Metrics

### Per Message

Individual message performance:

```
Message to: +1***1234
Clicked: Yes
Converted: Yes
Revenue: $24.99
```

### Per Creative

Aggregate creative performance:

```
Creative: "Flash Sale 50%"
Sends: 10,000
Clicks: 1,200
Conversions: 48
Revenue: $1,152
Revenue/Send: $0.12
```

### Per Offer

Offer-level performance:

```
Offer: Summer Clearance
Total clicks: 15,000
Conversions: 600
Revenue: $14,400
EPC: $0.96
Conv Rate: 4%
```

### Per Campaign

Campaign ROI:

```
Campaign: Weekend Promo
Messages sent: 25,000
Segments used: 35,000
Cost: ~$350
Revenue: $2,100
ROI: 500%
```

## Reports

### Performance Report

View revenue by:

* Date range
* Creative
* Offer
* Sending list
* Custom dimensions

### LTV Cohort Report

Track revenue over time by signup cohort:

```
January signups:
- 7-day revenue: $12,000
- 14-day revenue: $20,000
- 30-day revenue: $28,000
- 60-day revenue: $38,000
- Lifetime revenue: $52,000
```

LTV windows available: 7d, 14d, 30d, 60d, and Lifetime.

### Revenue by Contact

See individual contact value:

```
Contact: +1***5678
Lifetime sends: 45
Lifetime clicks: 12
Lifetime revenue: $156
```

## Attribution Window

Conversions must occur within the attribution window to be credited. The attribution window is set at the time of attribution and applies globally -- it is not configurable per offer.

| Window   | Good For             |
| -------- | -------------------- |
| 24 hours | Impulse purchases    |
| 7 days   | Standard e-commerce  |
| 30 days  | Considered purchases |

## Revenue Calculations

### Revenue per Send

```
Revenue per Send = Total Revenue / Total Sends
```

Key efficiency metric—how much each message earns.

### EPC (Earnings per Click)

```
EPC = Total Revenue / Total Clicks
```

Indicates click quality and offer performance.

### ROAS (Return on Ad Spend)

```
ROAS = Revenue / (Sends × Cost per Segment)
```

Your return on messaging investment.

## Optimizing Revenue

### By Creative

Identify top revenue-generating creatives:

1. Run Performance Report by creative
2. Sort by Revenue per Send
3. Use top performers more, retire underperformers

### By Audience

Find high-value segments:

1. Run report by custom dimension (state, signup source, etc.)
2. Create audiences of high-revenue segments
3. Prioritize these in campaigns

### By Offer

Compare offer performance:

1. View offers sorted by EPC
2. Focus on high-EPC offers
3. Retire low performers

## Troubleshooting

<AccordionGroup>
  <Accordion title="Revenue not showing">
    Check:

    * Are postbacks configured correctly?
    * Is the click\_id being passed?
    * Is the conversion within the attribution window?
  </Accordion>

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

    * Payout amounts are current
    * All conversions are being captured
    * Attribution window is appropriate
  </Accordion>

  <Accordion title="Duplicate revenue">
    Ensure:

    * Postbacks aren't firing multiple times
    * Manual imports don't duplicate platform data
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Reporting" icon="chart-line" href="/guides/reporting/overview">
    Detailed analytics
  </Card>

  <Card title="TUNE Integration" icon="plug" href="/guides/offers/tune-integration">
    Automate revenue sync
  </Card>
</CardGroup>
