---
updatedAt: 2026-09-07T20:20:51.000Z
agentTools:
  projectIndex: https://developers.viral-loops.com/llms.txt
---

# How to Use Value Tracking to Measure Referral Revenue

When running a referral campaign, tracking simple conversion counts isn't always enough—especially if your customers spend different amounts. **Value Tracking** (also commonly referred to as **revenue tracking**) allows you to attach monetary or numerical values to each conversion event, enabling you to measure the exact return on investment (ROI) generated by your referral program.

## What is Value Tracking?

Value Tracking is a feature in Viral Loops that captures and records the order total, subscription price, or custom numerical value associated with a participant's conversion.

Instead of treating every referral as equal, value tracking lets you see the exact gross revenue generated by each participant and their referred network.

***

## Why Use Value Tracking in Your Campaign?

Implementing revenue tracking unlocks deeper analytics and opens up advanced campaign strategies:

* **Measure True ROI:** Understand the total monetary value your referral program brings to your business beyond raw participant count.
* **Reward Based on Spend:** Create tiered rewards or give commission percentages (e.g., "Give 10% cash back based on purchase total") rather than flat rewards.
* **Identify Top Influencers:** Pinpoint your highest-value advocates based on the actual revenue their invited friends generate.
* **Optimize Campaign Spend:** Compare acquisition costs directly against lifetime value (LTV) and total purchase revenue.

***

## How Value Tracking Works

When a conversion event is sent to Viral Loops—whether via the JavaScript SDK, Server-Side API, or integrations like Stripe—you can optionally include a `value` parameter in the payload.

### Example API Request with Revenue Data

When calling the Viral Loops API, pass the numeric value in the request body:

```json
{
  "apiToken": "YOUR_VIRAL_LOOPS_API_TOKEN",
  "params": {
    "event": "conversion",
    "user": {
      "email": "customer@example.com"
    },
    "options": {
      "value": 29.99
    }
  }
}
```

> **Note:** The value field accepts integers or floating-point decimals representing the monetary transaction amount (e.g., 129.99).

<br />

> **Warning:** it is highly recommended to use <Anchor target="_blank" href="https://developers.viral-loops.com/docs/convert-participants-using-the-server-side-api">conversion value tracking via the Server-Side API</Anchor> and to <Anchor target="_blank" href="https://developers.viral-loops.com/docs/how-to-secure-your-campaign-with-authorized-conversions">use Authorized Conversions only</Anchor>

<br />

## Enabling Value Tracking in the Campaign Builder

To enable revenue tracking for your campaign:

1. Go to your **Viral Loops Dashboard** and edit your campaign.
2. Navigate to the **Goals** step in the campaign wizard.
3. Switch to the **Value Tracking** tab.
4. Toggle **Value Tracking** ON and select your preferred currency setting.
5. Save your campaign settings.

***

## Supported Methods for Passing Conversion Values

You can transmit value tracking data through multiple setup options:

1. **Server-Side / Private API Calls (Recommended):** The most secure method for passing financial data directly from your server or backend order system.
2. **Stripe Integration:** Automatically captures invoice totals and subscription charges without custom development.
3. **JavaScript SDK:** Pass purchase totals on the client side during checkout confirmation.

***

## Best Practices for Revenue Tracking

* **Use Server-Side Calls for Purchases:** To prevent users from altering order amounts in the browser, always send purchase values using the Private API or native payment processor integrations.
* **Combine with Authorized Conversions:** For maximum security, pair Value Tracking with the **Allow only authorized conversions** setting to ensure only valid backend transactions are recorded.

<br />

## Related Articles

* <Anchor target="_blank" href="https://developers.viral-loops.com/docs/convert-participants-using-the-server-side-api">Capture covnersions using the Server-Side API</Anchor>
* [How to secure your campaign with Authorized Conversions](https://developers.viral-loops.com/docs/how-to-secure-your-campaign-with-authorized-conversions)