> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.drimify.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Using the ref Parameter to Track Traffic Sources

Deploy one game across multiple channels and pinpoint exactly where every participant came from — social, paid ads, email, in-store, and more.

## What is the `ref` parameter?

The `ref` query string parameter is a simple tag you append to any Drimify game URL. When a participant clicks your link, Drimify records the `ref` value alongside their session data. That value then appears in your statistics dashboard and in every data export, letting you filter and compare performance by source.
Instead of publishing a single, anonymous link everywhere and guessing where your traffic came from, you publish labelled links — one per channel — and your data tells the full story.

## Why this matters

By default, Drimify's referral statistics show broad origin categories: Direct, Website, and Social Media. That tells you roughly where people arrived from, but it can't distinguish between:

* Your Instagram post vs. your Facebook ad
* A newsletter vs. a paid email campaign
* Your London store vs. your Manchester store
* QR code A on a shelf vs. QR code B on a poster

The `ref` parameter closes that gap completely. You can run the **exact same game** from multiple locations or campaigns and know, entry by entry, which source drove each participant.

> **Real-world power:** Imagine you launch an instant-win game to promote a new product. You share it via Instagram Stories, a paid Google Ad, your email newsletter, and QR codes in five stores. With `ref`, you can measure the conversion rate per channel, identify which store had the highest engagement, and cut spend on the channels that aren't performing — all from a single experience.

## Common use cases

* **Social media channels** Compare Instagram vs. Facebook vs. TikTok in one view. See which platform drives more completions, not just clicks.
* **Paid vs. organic** Measure whether your paid ads are actually outperforming your organic posts for the same game experience.
* **Physical locations** Assign a unique `ref` to each store's QR code. Understand which locations generate the most in-store engagement.
* **Email campaigns** Track which email sequence or segment drives the most game participation and tailor future sends accordingly.
* **Partners & influencers** Give each partner or influencer their own `ref` value. Attribute traffic and results to each collaboration clearly.
* **A/B campaign testing** Test two different creatives or call-to-action messages pointing to the same game. Let the data decide the winner.

## How to use the `ref` parameter

Simply append `?ref=your_label` to the end of your game's URL. The value can be any text string that is meaningful to you — keep it lowercase with no spaces (use hyphens or underscores instead).

**Base URL:**

```
https://apps.drimify.com/XBs15jKF/
```

**With a ref parameter:**

```
https://apps.drimify.com/XBs15jKF/?ref=instagram-organic
```

**Example set of labelled links:**

| Channel | URL |
| ---- |
| Instagram (organic post) | `…/XBs15jKF?ref=instagram-organic` |
| Instagram (paid ad) | `…/XBs15jKF?ref=instagram-paid` |
| Email newsletter | `…/XBs15jKF?ref=email-newsletter` |
| London store QR code | `…/XBs15jKF?ref=store-london` |
| Manchester store QR code | `…/XBs15jKF?ref=store-paris` |
| Influencer partnership | `…/XBs15jKF?ref=influencer-johndoe` |

> **Combining with other query strings:** If you are already passing other parameters (e.g. `?name=John`), add `ref` with an ampersand: `?name=John&ref=instagram-organic`

## Where to find your `ref` data

1. **Statistics dashboard** Open your game in the Drimify editor and navigate to the **Statistics** tab. The **Referrals** section will show a breakdown that includes your `ref` values as distinct traffic sources.
2. **Data export** Go to **Export User Data**. Each participant's row will include the `ref` value from the link they used. This lets you filter, sort, and cross-reference engagement with form data, scores, and promo codes at an individual level.
3. **CRM & marketing tools** Because the `ref` value appears as a dedicated column in your export, you can import it directly into your CRM, email platform, or reporting tool to connect campaign attribution to your wider marketing data.

## Example scenario: one game, five sources

A fashion retailer creates a single spin-the-wheel game on Drimify for their summer promotion. Rather than sharing one generic link, they create five labelled versions:

* Instagram bio link → `ref=instagram-bio`
* Facebook paid campaign → `ref=facebook-paid`
* Email to loyalty members → `ref=email-loyalty`
* QR code at checkout (all stores) → `ref=store-qr`
* Influencer partnership → `ref=influencer-sophie`

After two weeks, their export shows that `email-loyalty` had the highest completion rate by far, `facebook-paid` drove the most raw volume, and `store-qr` produced the highest prize redemption rate. They reallocate their paid budget accordingly and brief their influencer partner on what worked.

## Best practices

* **Be consistent with naming.** Decide on a convention before you launch — e.g. `channel-type-variant` — and stick to it. Mixed capitalisation or typos create separate entries in your data.
* **Keep values short and meaningful.** Values like `ig-paid-aug25` are easy to read in a spreadsheet. Avoid spaces; use hyphens or underscores instead.
* **Create one link per placement, not one per channel.** If you run three different Instagram Stories, give each a distinct ref — e.g. `ig-story-01`, `ig-story-02` — so you can compare creative performance.
* **Use it with QR codes.** QR codes with embedded `ref` values are one of the most powerful uses: each printed material, each store, or each event gets its own code and its own trackable entry in your data.
