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

# Track SMS campaigns with URL parameters

> Track SMS campaigns with URL parameters: add comet_source=sms to your text message links to see the visits, leads and sales each campaign brings.

To track SMS campaigns with URL parameters, you add a short tag, `comet_source=sms`, to the end of every link in your text messages. When someone taps the link, the tag tells Cometly the visit came from SMS.

This lets you report on SMS as its own source, next to your ads and email. Add a campaign or message tag as well, and you can see which text message or broadcast produced each lead and sale.

## Add the Cometly SMS parameter

Append the following URL parameter to every link in the SMS messages you send:

```text theme={null}
?comet_source=sms
```

You can also copy the parameter in Cometly: go to **Setup**, open step 4 **Add URL parameters to your ads**, choose **SMS** in the **Select integration** dropdown and click **Copy Parameters**.

> [!TIP]
>
> **Example:** if your SMS contains this link:
>
> `https://www.cometly.com/demo`
>
> append the URL parameter like so:
>
> `https://www.cometly.com/demo?comet_source=sms`

Add the parameter to each new text message you send, not only the ones you have today.

Using Klaviyo? You can have it add the parameter for you. See [Email and SMS tracking with Klaviyo](https://docs.cometly.com/guides/url-parameters/klaviyo-email-and-sms.md).

## Track specific SMS campaigns and messages

For more granular SMS reporting, add more URL parameters to identify the specific SMS or the SMS broadcast or campaign, such as:

* `utm_campaign`
* `utm_content`

> [!TIP]
>
> **Example:** if your SMS contains this link:
>
> `https://www.cometly.com/demo`
>
> append the URL parameters like so:
>
> `https://www.cometly.com/demo?comet_source=sms&utm_campaign=smscampaign1&utm_content=sms1`

## SMS reporting

To report on your SMS campaigns, open the [Report Builder](https://docs.cometly.com/guides/report-builder/build-a-report.md) and select the **SMS** source under **Sources**.

If you added the extra URL parameters shown above, you can report on specific campaigns or SMS messages with the [**URL Parameters** filter](https://docs.cometly.com/guides/report-builder/url-vs-url-parameters-filters.md) in the Report Builder.

## Check it worked

Once people tap your tagged links, open the Report Builder and select the **SMS** source. Those visits, and the conversions that follow them, are reported under **SMS**.

## Frequently asked questions

### What if my SMS link already has a question mark in it?

Then the link already has parameters, so start the Cometly parameter with `&` instead of `?`. For example, `www.test.com?variant=123456` becomes `www.test.com?variant=123456&comet_source=sms`. See [URLs that already have parameters](https://docs.cometly.com/guides/url-parameters/urls-with-variant-parameter.md).

### Does Cometly track SMS clicks without the URL parameter?

Not as SMS. A tap on a link in a text message usually arrives without a referring URL, and Cometly reports visits without one as **Direct / None**. Add `comet_source=sms` to the link so the visit counts toward the SMS source. See [Referral vs. direct traffic sources](https://docs.cometly.com/guides/analyzing-data/referral-vs-direct.md).

### Do I need the Cometly pixel on the page my SMS links to?

Yes. The Cometly pixel (the tracking script on your website) is what records each visit and where it came from, so it must be installed on the page the link opens. See [Install and verify the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md).

## Next steps

* [Add the SMS parameter automatically with Klaviyo](https://docs.cometly.com/guides/url-parameters/klaviyo-email-and-sms.md)
* [Build a report in the Report Builder](https://docs.cometly.com/guides/report-builder/build-a-report.md)
* [Filter reports by URL parameters](https://docs.cometly.com/guides/report-builder/url-vs-url-parameters-filters.md)
* [Track email campaigns with URL parameters](https://docs.cometly.com/guides/url-parameters/email.md)
* [Set up URL parameters for all channels](https://docs.cometly.com/getting-started/url-parameters.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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