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

# Pay for Results: Conversion Widget

Only pay after you get measurable results.

Add the widget to a conversion you already run, such as completing onboarding, signing up, or making a purchase. Prizerail handles the campaign, the prizes, and the measurement.

**Pay for results:** Pay-as-you-go per incremental conversion.

> [!NOTE]
>
> The examples below outline the functionality of the conversion widget. Please
> [contact us](https://www.prizerail.com/get-in-touch) to discuss early access.

## How it works

1. **Add an incentive** to an existing conversion flow, such as completing onboarding, signing up for a service, or making a purchase.
2. **Measure incremental conversions.** Prizerail randomly keeps a small group of visitors from seeing the campaign. Everyone else sees it. The control group is sized to your traffic, and conversion rates are compared to estimate the additional impact.
3. **Track completed actions.** Prizerail records conversions, creates eligible prize entries, and sends weekly analytics.

## Display the incentive

Use Prizerail's prebuilt HTML elements to display your campaign within an existing page. A banner fits the step where most people drop off. Your design, our prize.

```html theme={null}
<h2>Complete your action</h2>

<prizerail-campaign />

<!-- Your existing form or conversion flow -->
```

The control group does not see the campaign. Everyone else sees the incentive.

You can also display confirmation content after a successful conversion:

```html theme={null}
<h2>Action complete!</h2>

<prizerail-completed />
```

Prefer your own design? You can build the experience yourself and use the widget's state and callbacks.

## Track conversions

When a user completes the desired action, submit their user ID and a unique conversion ID.

```jsx theme={null}
prizerail.completed("user_123", "action_456");
```

Prizerail records the conversion and creates the corresponding campaign entry.

Users can complete multiple qualifying actions, provided each conversion has a unique ID.

### Optional: Track funnel activity

Record when users begin a conversion step:

```jsx theme={null}
prizerail.started("action_started");
```

Track additional events for more detailed funnel insights:

```jsx theme={null}
prizerail.track("action_step_completed", {
  step: 2,
});
```

These events help provide context around user behavior and where visitors drop off.

## Show results

After a draw, place this element where that user should see their results. Use the same user id you sent to `completed`.

```html theme={null}
<prizerail-results data-user-id="user_123" />
```

Prizerail shows the drawing results available for that user, most recent first. Reading results reports the outcome. It does not award a prize.

For your own UI, ask for the same results directly:

```jsx theme={null}
prizerail.checkUserResults("user_123");
```

## What Prizerail handles

* **Control group:** Sized to your traffic, so the additional impact can be measured.
* **Campaign eligibility:** Campaign rules and eligibility checks.
* **Prize entries:** Automatic entry creation from submitted conversions.
* **Weekly analytics:** The results of the campaign, with the measurement handled for you.
* **Drawing results:** Prize outcomes and result retrieval.

We handle the rest.

## Interested in paying for results?

[Get in touch](https://www.prizerail.com/get-in-touch) to talk it through.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.