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

# WhatsApp link tracking

> Add UTM tags to the buttons of your WhatsApp templates, so campaign traffic shows up in Google Analytics and Shopify.

Your WhatsApp templates can add **UTM tags** to their button links. When a customer
taps the button, your analytics (Google Analytics, Shopify, or any tool that reads
UTM tags) sees the visit as coming from Boom, from WhatsApp, and from that template.

You type your links as usual. Boom adds the tags when each message is sent.

> [!NOTE]
>
> Links the agent sends inside a conversation are tagged too, and they use the same
> `utm_source=boom`. That way all Boom traffic shows up as one source in your reports.

## Turn it on

**1. Create a template with a link button**

In **Templates → WhatsApp → New template**, choose **Call to action** or **Card**
and add a button of type **URL**. Use your normal link, for example
`https://yourstore.com/promo`, or a link that ends in a variable, such as an
abandoned-checkout link.

**2. Leave 'Tag links for analytics' ticked**

Right under the buttons, **Tag links for analytics** is ticked by default, next
to the campaign name the links will carry. Under each URL field you'll see the
tags that link gets. Use **Customize** to change the source, medium or campaign
(empty fields use the defaults) or to turn off **See who tapped each button**.
Then create the template as usual.

## The tags

| Tag | Default | Example |
| - | - | - |
| `utm_source` | `boom` | `boom` |
| `utm_medium` | `whatsapp` | `whatsapp` |
| `utm_campaign` | The template's name, lowercased with spaces as `_` | `black_friday_mx` |

A button link of `https://yourstore.com/promo` opens as
`https://yourstore.com/promo?utm_source=boom&utm_medium=whatsapp&utm_campaign=black_friday_mx`.
If your link already has a query (`?ref=ig`), the tags are added after it.

## Change the tags later

Open the template and use **Edit** on its **Link tracking** card. Because the tags
are added when each message is sent, a change applies to the next messages right
away, **without a new WhatsApp review**.

Tracking can only be turned **on** when you create a template, because it changes
the button link that WhatsApp reviews. To track an older template, create a new one
with tracking on.

## When a link is not tagged

* **The link already has its own UTM tags.** Yours are kept as they are, and Boom
  adds nothing.
* **The link has a `#` section** (`https://yourstore.com/page#reviews`). Tags after a
  `#` never reach your site, so the link is sent unchanged.

The line under such a link's URL field says it isn't tagged.

## What your analytics will show

* **Visits open inside WhatsApp.** WhatsApp opens business links in its own in-app
  browser, which shows only your domain. The tags are still in the address; the
  customer can see them with **⋯ → Copy link**. That browser keeps its own cookies,
  so a customer logged in to your store in Safari or Chrome arrives logged out.
* **Cookie consent comes first.** If your site asks visitors to accept cookies,
  tools such as Google Analytics record the visit, and its UTM tags, only after the
  visitor accepts. Some taps will therefore not appear in those reports, as with any
  other campaign link.

## From the API or MCP

Pass `tracking` when you create a template:

```json theme={null}
{
  "name": "black_friday_mx",
  "language": "es",
  "category": "MARKETING",
  "contentType": "CALL_TO_ACTION",
  "content": {
    "body": "Hola {{1}}, ya empezó el Black Friday.",
    "actions": [{ "type": "URL", "title": "Ver ofertas", "url": "https://yourstore.com/promo" }]
  },
  "variables": { "1": "Ana" },
  "tracking": { "utm": {} }
}
```

`{ "utm": {} }` uses the defaults. Set any of `source`, `medium` or `campaign` to
override them. Without `tracking`, the template is created without tags.

Change the tags later with `PATCH /api/v1/templates/{id}/tracking` (MCP:
`templates_tracking_update`), for example `{ "tracking": { "utm": { "campaign": "cyber_monday" } } }`,
or `{ "tracking": { "utm": false } }` to stop tagging.

## See who tapped each button

With **See who tapped each button** (under **Customize**, ticked by default when it's
available for your organization), Boom counts each customer's taps on the buttons,
not just total visits. The template's page shows how many people tapped, out of how
many sends.

Your customers still land on your link; Boom records the tap on the way. This can
only be chosen when the template is created. From the API, pass
`"tracking": { "utm": {}, "clicks": true }`.

> [!NOTE]
>
> Tap counting is being rolled out per organization. Where it isn't enabled yet,
> templates are created with UTM tags only.


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