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

# Setting Up an A/B Test

> Split your link traffic between multiple destination URLs to find out which landing page converts best.

## What is A/B Testing in TyrionURL?

A/B testing (also called split testing) lets you direct a portion of your short link's traffic to two or more different destination URLs. TyrionURL tracks which variant each visitor was sent to, and — when conversion tracking is configured — which variant drove the most revenue or leads.

Instead of guessing which landing page performs better, you let real traffic decide.

***

## Feature Overview

| Capability               | Details                                                 |
| ------------------------ | ------------------------------------------------------- |
| **Traffic splitting**    | Configure percentage split across variants              |
| **Multiple variants**    | Support for 2+ destination URLs                         |
| **Conversion tracking**  | Revenue and lead events tracked via API key integration |
| **Built on short links** | A/B tests are added to existing short links             |

***

## When to Use A/B Testing

* Comparing two landing page designs for the same product
* Testing a promotional offer vs. the standard price page
* Evaluating different calls-to-action (e.g., "Buy Now" vs. "Get Started Free")
* Measuring performance of two product detail page formats
* Testing localized vs. global landing pages

***

## Setting Up an A/B Test

<Steps>
  <Step title="Create or Open a Short Link">
    A/B tests are added to existing short links. Create a short link first (or open one from your dashboard) and then enable A/B testing from the link's settings.

    → See: [Creating Your First Short Link](/getting-started/first-link)
  </Step>

  <Step title="Enable A/B Testing">
    From the link's action menu, click **A/B Test** or open the link settings and toggle **Enable A/B Testing**.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/docs-tyrionurl/images/ab-test-toggle.png" alt="A/B test toggle in link settings" />
    </Frame>
  </Step>

  <Step title="Configure Variants in the A/B Test Modal">
    The A/B Test modal opens. You'll see:

    * **Variant A** — pre-populated with the link's original destination URL
    * **Add Variant** — click to add Variant B, C, etc.

    For each variant, enter:

    * The destination URL
    * The traffic percentage to allocate

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/docs-tyrionurl/images/ab-test-modal.png" alt="A/B test modal with traffic split configuration" />
    </Frame>

    <Info>
      Traffic percentages across all variants must sum to 100%. TyrionURL validates this before saving.
    </Info>
  </Step>

  <Step title="Set a Completion Date (Optional)">
    Enter an optional completion date for the test. After this date, the test stops splitting traffic.

    TODO: Needs Product Verification — confirm whether traffic defaults to Variant A or stops entirely after completion date.
  </Step>

  <Step title="Save the A/B Test">
    Click **Save**. The A/B test is now active. Every visitor to the short link will be routed to a variant according to the configured split.
  </Step>
</Steps>

***

## How Traffic is Split

TyrionURL uses server-side random assignment on each request to ensure statistically fair distribution. If you configure a 60/40 split:

* Approximately 60% of visitors go to Variant A
* Approximately 40% go to Variant B

Assignment is random per click — not per session or cookie. This means the same visitor could theoretically see different variants on repeated visits.

***

## Viewing A/B Test Results

After your test runs, view results in the link's analytics panel:

| Metric                 | Description                                                          |
| ---------------------- | -------------------------------------------------------------------- |
| **Clicks per variant** | How many clicks each destination received                            |
| **Conversion events**  | Leads or revenue attributed to each variant (requires API key setup) |
| **Conversion rate**    | Clicks → conversions ratio per variant                               |

→ Full details: [Tracking Conversions](/ab-testing/tracking-conversions)

***

## Best Practices

<Check>Run the test long enough to reach statistical significance — typically at least 100–200 clicks per variant minimum before drawing conclusions.</Check>
<Check>Change only one variable per test (destination URL). If you change both the page design and the offer simultaneously, you can't isolate what drove the difference.</Check>
<Check>Set a completion date to ensure you remember to review results and make a decision.</Check>
<Check>Set up [conversion tracking](/ab-testing/tracking-conversions) before launching so you capture revenue data from the start.</Check>

***

## Common Mistakes

<Warning>
  **Ending the test too early** — A few days of data is rarely enough. Early trends often reverse. Wait for sufficient sample size before declaring a winner.
</Warning>

<Warning>
  **Testing during atypical periods** — Avoid launching A/B tests during holidays, major sales events, or external disruptions that might skew behavior.
</Warning>

<Warning>
  **Not setting up conversion tracking** — Click counts alone don't tell you which variant converted better. Set up the [API key integration](/ab-testing/api-keys) before starting.
</Warning>

***

## Related Pages

<CardGroup cols={3}>
  <Card title="API Keys" icon="key" href="/ab-testing/api-keys">
    Generate keys to enable conversion tracking.
  </Card>

  <Card title="Tracking Conversions" icon="coins" href="/ab-testing/tracking-conversions">
    Capture revenue and lead events from partner sites.
  </Card>

  <Card title="Analytics" icon="chart-line" href="/analytics/overview">
    View click and performance data.
  </Card>
</CardGroup>
