> For the complete documentation index, see [llms.txt](https://docs.rafflex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rafflex.io/managing-your-site/analytics/utm-tags.md).

# UTM Tags

UTM tags allow you to track exactly where customers are clicking from, so you can see what marketing is working and what's not.

***

### What Are UTM Tags?

A UTM link is just your normal link with some extra tracking information added to the end. The extra information tells Rafflex where the click came from.

For example, you post your competition on Facebook and someone clicks your link and buys tickets. Because the link had UTM tags, that order is labelled as coming from Facebook, so you know your post worked.

There are five UTM tags you can use. You do not need all of them.

| Tag               | What it describes                                              | Example                            |
| ----------------- | -------------------------------------------------------------- | ---------------------------------- |
| **utm\_source**   | Where the traffic comes from                                   | facebook, instagram, email, tiktok |
| **utm\_medium**   | The type of traffic                                            | paid, social, referral, sms        |
| **utm\_campaign** | The promotion or campaign name                                 | march\_flashsale                   |
| **utm\_term**     | An optional keyword, often used for paid search                | car\_competition                   |
| **utm\_content**  | An optional label to tell apart two links in the same campaign | blue\_banner, video\_ad            |

***

### How to Add UTM Tags to a Link

1. Go to [utmtagbuilder.com](https://www.utmtagbuilder.com/).
2. Under **URL Address**, enter the link to your homepage or competition page (for example, <https://yourrafflesite.co.uk/your-competition>).
3. Fill in the UTM details:
   1. **Campaign Source** → Where the traffic comes from (for example, facebook, email, instagram).
   2. **Campaign Medium** → Type of traffic (for example, paid, social, referral).
   3. **Campaign Name** → Promo or campaign name (for example, march\_flashsale).
4. **Copy** the generated link (for example, <https://yourrafflesite.co.uk/your-competition?utm\\_source=facebook\\&utm\\_medium=paid\\&utm\\_campaign=march\\_flashsale>).

{% hint style="warning" %}
You don't need to fill out all the UTM fields, but **you should always use Source**. If a link has a medium or campaign but no source, the order will show as **Direct** on your Orders page.
{% endhint %}

{% hint style="success" %}
Pick one spelling for each source and stick to it. Rafflex shows exactly what is in the link, so **facebook**, **Facebook** and **fb** will appear as three different sources. Using lowercase every time keeps your results tidy.
{% endhint %}

UTM links work on any page of your site, so you can point people at your homepage, a single competition or a category page.

***

### Using Your UTM Tag

* **Social Media Posts** → Use the UTM link instead of a regular link when posting on Facebook, Instagram or Twitter.
* **Facebook Ads** → Paste the UTM link in the Website URL field when setting up your ad.
* **Emails** → Add UTM links to promotional emails so you can see how many sales come from each send.
* **Influencers & Affiliates** → Give each influencer a unique UTM link so you can track who is driving the most sales.
* **Influencer codes** → You can also give each influencer their own [discount code](https://docs.rafflex.io/marketing/website-tools/promos-and-discounts.md), limited to particular competitions if you like. The [Coupon ROI Analysis](https://docs.rafflex.io/managing-your-site/downloads/coupon-roi-analysis.md) report then shows how many orders and how much revenue each code brought in (contact RaffleX support if you do not see Downloads & Reports in your admin panel).

***

### Where to See Your Results

UTM results are shown against your **orders**. They do not appear on the [Analytics](https://docs.rafflex.io/managing-your-site/analytics.md) page, which shows totals rather than sources.

{% tabs %}
{% tab title="Orders page" %}

1. In the admin panel, click **Orders** in the left hand menu.
2. Look at the **Source** column. It shows the source from the customer's tracked link (for example, **facebook**).
3. Orders with no tracked link show **Direct**.
4. Orders where the customer came back through a [dropped basket reminder](https://docs.rafflex.io/marketing/website-tools/dropped-basket-recovery.md) show **Rafflex Dropped Basket** in a blue label.
5. To see everything that was recorded for an order, click **View** and look at the **Tracking** box (it only appears on orders that came from a tracked link). Depending on the link, it can show **Recovery** (for dropped basket orders), the **Source**, **UTM Medium**, **UTM Campaign**, **UTM Term**, **UTM Content**, the website the customer came from, and **First Landing** (the first page they arrived on).

For more about the Orders page, read [Orders](https://docs.rafflex.io/managing-your-site/orders.md).
{% endtab %}

{% tab title="Orders Export" %}

1. In the admin panel, click **Orders** in the left hand menu.
2. Click **Export** at the top right of the page.
3. Choose a **From** date and a **To** date. The **To** date can be no more than 7 days after the **From** date, so for longer periods run a few exports.
4. Click **Submit** and the file downloads straight away. Open it in Excel, Google Sheets or Numbers.

The spreadsheet includes **UTM\_Source**, **UTM\_Medium** and **UTM\_Campaign** columns for every order. These columns are left blank for orders that did not come from a tracked link. Orders from a dropped basket reminder show a source of **rafflex**, a medium of **email** and a campaign of **dropped\_basket**.
{% endtab %}

{% tab title="Customer Acquisition report" %}
For a summary of which sources, mediums and campaigns bring in the most customers and revenue, create the **Customer Acquisition** report from [Downloads & Reports](https://docs.rafflex.io/managing-your-site/downloads.md).

{% content-ref url="/pages/dJInV360gKqSr3n4t4Fh" %}
[Customer Acquisition Attribution](https://docs.rafflex.io/managing-your-site/downloads/customer-acquisition-attribution.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

***

### How Rafflex Decides Which Link Gets the Credit

When a customer arrives on your site through a link with UTM tags, or by clicking a link on Facebook (which adds its own tracking code to links), Rafflex starts tracking that visit in their browser. If they place an order while the tracking is active, the order is labelled with that source.

* **The first tracked link wins.** If the customer clicks a second tracked link soon after the first, the first one keeps the credit.
* **Tracking lasts for 3 hours** from the first tracked click, in the same browser. After that, the next tracked link they click starts fresh. If they order after 3 hours without clicking another tracked link, the order shows as **Direct**.
* **Dropped basket reminders always take over.** If a customer clicks the link in a dropped basket reminder email, that click replaces any earlier tracking, so the order is shown as **Rafflex Dropped Basket**.
* **Clicks from Facebook** are labelled with the website they came from (for example, **facebook.com**), even if your link also had a utm\_source. Any medium and campaign in your link are still recorded. Some apps do not pass on which website the visitor came from, and in that case the order shows as **Direct**.
* **Different devices are tracked separately.** If someone clicks your link on their phone but buys on their laptop, the order shows as **Direct**.

***

### Why Facebook and Rafflex Show Different Numbers

{% hint style="info" %}
It is completely normal for Facebook Ads Manager to report more sales than your Rafflex UTM results, because the two count sales in different ways. Rafflex gives the credit for a sale to the **first** tracked link a customer clicks (a UTM link or a Facebook link), and that credit lasts for **3 hours** from the click, in the same browser. If the customer clicks a second tracked link within those 3 hours, the first one keeps the credit. If they come back after 3 hours, or buy on a different phone, computer or browser, the sale shows as "Direct" unless they click a tracked link again. Facebook, by default, counts a sale if the customer clicked your ad in the last **7 days** or simply saw it in the last **day**. It can also follow people across devices because they are logged in to Facebook, and it has no idea whether an email, SMS or influencer link played a part. So a customer who sees your ad on Monday and buys through your email on Wednesday may be claimed by Facebook but credited to email (or "Direct") in Rafflex. Neither number is wrong. They simply answer slightly different questions, so use them side by side rather than expecting them to match.
{% endhint %}

{% hint style="info" %}
Facebook can also show **fewer** purchases than Rafflex. Rafflex only reports an order to Facebook as a Purchase when it took real money. Free entries and orders paid entirely with site credit are sent to Facebook as separate events, so they appear in your Rafflex orders but not in Facebook's purchase count. See [Tracking](https://docs.rafflex.io/marketing/facebook-and-meta/tracking.md#how-each-type-of-order-is-reported).
{% endhint %}

***

### Adding a UTM Link to an SMS

1. [Create your UTM link](#how-to-add-utm-tags-to-a-link).
2. Shorten it using [TinyURL](https://tinyurl.com/).
3. **Use the short link** in your SMS instead of the full UTM URL.

Now, your SMS stays clean, but you still track where clicks come from!

{% hint style="info" %}
A short link still works for tracking, because it sends the customer to your full UTM link when they tap it.
{% endhint %}
