> For the complete documentation index, see [llms.txt](https://docs.perkville.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perkville.com/features/referrals/tracking-referrals-with-utm-parameters.md). Agents can also search and read this documentation through its [MCP server](https://docs.perkville.com/~gitbook/mcp).

# Tracking referrals with UTM parameters

Does your front-desk QR code bring in more referrals than your member newsletter or the **Refer a Friend** button in your app? UTM parameters are labels you add to a URL. Give each placement its own label to see how many referrals it generates and how many are completed.

## Tag your referral link

1. Copy the URL of your program’s **Refer a Friend** page. Use this page for a campaign that invites members to refer friends. If you already have a personalized offer link for a friend, you can add tags to that link, too.
2. Add your tags to the end of the URL. Start with `?` if the URL has no query parameters. If it already contains a value such as `?loc=123`, keep it and start your tags with `&`. Separate each additional tag with `&`.
3. Use the full tagged URL as the destination for your QR code, email link, or app button. Before publishing, open it as a member, copy the offer link from the referral page, and check that your tags appear in the copied link.

For example, a front-desk poster could use this URL. Replace the example address with your own program’s referral page.

```
https://rewards.example.com/referral/?utm_source=front_desk&utm_medium=qr_code&utm_campaign=bring_a_friend
```

If a member scans the poster and texts the offer to a friend, the shared link keeps `utm_source=front_desk`. Perkville records the tags when the member submits a referral or the friend claims the offer.

## Choose your tags

All five parameters are optional. Use the same campaign name across placements so you can compare them in one report.

| Parameter      | What to identify                                  | Example          |
| -------------- | ------------------------------------------------- | ---------------- |
| `utm_source`   | Where the member found the link                   | `front_desk`     |
| `utm_medium`   | How the member reached the referral page          | `qr_code`        |
| `utm_campaign` | The promotion you want to measure                 | `bring_a_friend` |
| `utm_content`  | Which placement or version the member used        | `lobby_poster`   |
| `utm_term`     | A keyword or audience segment you want to compare | `new_members`    |

For a single `bring_a_friend` campaign, use a different source for each placement.

| Placement                                | `utm_source`        | `utm_medium` | `utm_content`   |
| ---------------------------------------- | ------------------- | ------------ | --------------- |
| QR code on a gym or studio poster        | `front_desk`        | `qr_code`    | `lobby_poster`  |
| Link in a member newsletter              | `member_newsletter` | `email`      | `invite_button` |
| Refer a Friend button in your member app | `member_app`        | `app`        | `home_screen`   |

## See which placements generated referrals

In your Perkville dashboard, open [**Reports → Referral Attribution Summary**](https://docs.perkville.com/features/reports/referral-attribution-summary.md). Select the **Referral created date range** and run the report. Perkville summarizes all referrals created during those dates, including referrals without UTM tags. Each row in the exported CSV shows one location and one combination of UTM values.

To review just the `bring_a_friend` campaign, open the CSV in Excel or Google Sheets. In the spreadsheet, filter the **UTM campaign** column to `bring_a_friend`, then total **Referrals created** and **Completed referrals** by **UTM source** to compare placements across locations.

**Referrals created** counts referrals sent to a friend or created when a friend claims a shared offer. QR scans and page visits alone do not count. **Completed referrals** counts the referrals where the friend took a [qualifying action defined by your program](https://docs.perkville.com/features/referrals/completing-a-referral.md), such as purchasing a membership.

To check one referral, open the referring member’s profile and select **Referrals**. You’ll see the five UTM fields alongside the referral status. For a spreadsheet with one row per referral, run the [Referral Details report](https://docs.perkville.com/features/reports/referral-details.md). For column explanations and campaign comparisons, see the [Referral Attribution Summary guide](https://docs.perkville.com/features/reports/referral-attribution-summary.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.perkville.com/features/referrals/tracking-referrals-with-utm-parameters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
