# Same day visit criterion

The Same day visit 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_01hhq3my4ywe4nh2pq7x0a3z6n" id="h_01hhq3my4ywe4nh2pq7x0a3z6n"></a>

The Same day visit triggering criterion enables you to trigger a campaign to visitors that have already visited your website **at least once in the past 24 hours**. It can be their second, third, fourth, etc. session.

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

ABTasty gets this information from our main `ABTasty` cookie. We have a specific key called `pst` (that stands for “Previous Session timestamp”) that stores the precise date and time of the visitor's last visit.

We then do a basic calculation when a campaign uses this criterion, to determine whether it has been more or less 24 hours since the visitor's previous visit.

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

When you add this criterion to the trigger section of your campaign, it will automatically be activated once you launch your campaign. **You don’t have to configure anything.**

The AB Tasty tag simply checks whether the visitor has already visited the website.

<figure><img src="/files/UR3v3VSijZU41gnHX6qG" alt="" width="563"><figcaption></figcaption></figure>

* If they have never visited the website, the visitor won’t be assigned to the campaign.
* If they have already visited the website, AB Tasty checks if his last session took place less than 24 hours ago.
* If they have visited the website more than 24 hours ago, the visitor isn’t assigned to the campaign.
* If they visited the website less than 24 hours ago, the visitor is assigned to the campaign.

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

If you want your hesitating visitors to engage more and buy on your website, you can display a special coupon code during their second session within 24 hours.

To do so, choose the *Same day visit* triggering criterion in the *How* section of the targeting step of your campaign. This way, all visitors who return to your website less than 24 hours after their first session will be targeted and will benefit from this coupon code.

**Need additional information?**

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

Always happy to help!

<img src="/files/Ba71iryU6lTQjWv11E08" 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/same-day-visit-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.
