# URL Parameter criterion

The URL Parameter criterion is a triggering criterion that enables defining a [segment](/assets-library/creating-and-managing-segments.md).

To learn how to create a segment, please refer to this [article](/web-experimentation-and-personalization/targeting-step/how-to-create-a-segment-who-section.md).

## 📖 Definition <a href="#h_01hhq33qp37vq61cvb63gd6pya" id="h_01hhq33qp37vq61cvb63gd6pya"></a>

The URL Parameter criterion enables you to restrict the visibility of a campaign to visitors depending on the composition of their URL parameter(s) when they visit your website.

**A URL parameter is a way of passing on information about an event through a URL**. They are commonly used for tracking and analytics.

Parameters are located at the very end of the URL or within the path, depending on how the URL has been built.

URL **Parameters include a key paired with a value**. A URL parameter begins with a question mark (`?`) and each one is separated by an ampersand (`&`).

They can also be dynamically set in the path as values, separated by slashes and other characters (depending on the system used and how it’s implemented).

These key/value pairs are used to track campaigns such as acquisition or emailing campaigns.

For example, in the following URL:

<figure><img src="/files/6aNtMHKIRV3q67dxDazG" alt=""><figcaption></figcaption></figure>

In this example, the parameters are as follows:

| **🗝️ Key**   | **🔡 Value** | **❔ Whole parameter** |
| ------------- | ------------ | --------------------- |
| utm\_source   | google       | utm\_source=google    |
| utm\_medium   | banner       | utm\_medium=banner    |
| utm\_campaign | april21      | utm\_campaign=june25  |

## ⚙️ Configuration <a href="#h_01hhq33qp3fd291qwe3t9tq5f0" id="h_01hhq33qp3fd291qwe3t9tq5f0"></a>

To configure the URL Parameter criterion, choose whether you want to include (`is`) or exclude (`is not`) a key (ex: utm\_source) and enter the value of this key if there is one (ex: google).

{% hint style="info" %}
For the name and value of the parameter, you need to enter the string without `?` and `=` characters. This triggering criterion only works with query parameters such as `?`. It doesn’t work with hash `#`).
{% endhint %}

## 💡 Use case <a href="#h_01hhq33qp401j9mrdhy6fmf972" id="h_01hhq33qp401j9mrdhy6fmf972"></a>

Let’s say you want to trigger your campaign on VIPs users that come from a specific newsletter you have sent your VIP clients.

These people have received an email with a specific key (for example *utm\_campaign*) and value (for example *VIPParis*) appearing in the URL of their webpage. To trigger your campaign for this traffic source only, in the URL parameter trigger, you need to specify the key and value related to this email. In this example, it will be `utm_campaign` and `VIP_Paris`.

<img src="/files/Yv1hpXpipQbGK02YD67O" alt="" width="563">

## 🔎 How does it work? <a href="#h_01hhpyw4abkqmjd1yk9a78xfk5" id="h_01hhpyw4abkqmjd1yk9a78xfk5"></a>

The AB Tasty tag reads that information directly from the DOM `window.location.href` element.

**Need additional information?**

Submit your request at <product.feedback@abtasty.com>

Always happy to help!

<img src="/files/Qfj7BkeyYCj8LM29cDeQ" alt="" width="146">


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/assets-library/creating-and-managing-triggers/list-of-trigger-criteria/url-parameter-criterion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
