# New/Returning visitors criterion

The New/Returning visitors criterion is a segmentation 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_01hhpewehfcs902nwf1wp4e9de" id="h_01hhpewehfcs902nwf1wp4e9de"></a>

The New/Returning visitors criterion enables you to segment your audience based on the presence (or absence) of the AB Tasty cookie (for more on this, please refer to our [article](/account/performance-and-security/consent-policy---cookies-storage-and-privacy.md) on AB Tasty cookies).

## 🔎 How Does It Work? <a href="#h_01hhpcyeh3r9x758f97wt1cbn8" id="h_01hhpcyeh3r9x758f97wt1cbn8"></a>

The information comes from a specific `ABTasty` cookie. AB Tasty sets a value for each visitor in a specific variable (key is `ns` for the number of sessions). This variable is incremented each time a visitor is initiating a session when the session’s first page loads. A new visitor is a visitor with an **ns** value of **1**.

<img src="https://pf-emoji-service--cdn.us-east-1.prod.public.atl-paas.net/standard/caa27a19-fc09-4452-b2b4-a301552fd69c/64x64/1f449.png" alt="backhand index pointing right" data-size="line"> [See Consent policy, cookies and storages documentation](/account/performance-and-security/consent-policy---cookies-storage-and-privacy.md)

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

From a practical standpoint, ever since you placed the AB Tasty tag on your website, AB Tasty has started collecting your visitors’ browsing data (sessions, page views, behavior).\
Each visitor is assigned an AB Tasty cookie with a unique visitor ID (`uid`) when they go to your website and accept cookies. This cookie is valid for 13 months, unless the visitor uses incognito browsing or clears their cookies.

This method, which complies with current regulations (GDPR), enables us to identify first-time visitors (since the AB Tasty tag was placed) and returning visitors, and to create 2 complementary segments to be used for targeting personalization campaigns.

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

Using the “New visitor” value, you can deliver a welcome message (modal, banner, etc.) which will only be seen by first-time visitors.

{% hint style="warning" %}
**Be careful in the reporting! New and returning visitors are not mutually exclusive.** It's expected that they don't add up to 100% in a campaign's reporting in some cases.\
For example:\
1 - Visitor A comes to the site for the first time, they are part of campaign 1. For this session, Visitor A is considered as a New visitor.\
2 - Visitor A comes back to the site on a new session, they are still part of campaign 1. For this session, Visitor A is considered as a Returning visitor.\
3 - Visitor A is 1 unique visitor when unfiltered. When filtering, Visitor A's sessions will be included in the new visitor AND returning visitor filter.
{% endhint %}

**Need additional information?**

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

Always happy to help!

<img src="/files/DPaZV4PF52CdgqICzspU" 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-segments/list-of-segment-criteria/newreturning-visitors-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.
