# Purchase Frequency criterion

The Purchase Frequency 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_01hhpda49st7bg1q3791davzk4" id="h_01hhpda49st7bg1q3791davzk4"></a>

The Purchase frequency targeting criterion enables you to create a segment of visitors based on the frequency of the purchases they made within a defined period of time.\
The Purchase frequency criterion is based on the transaction tag, which enables you to collect specific information on the buying patterns of users.

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

To configure the Purchase frequency criterion, apply the following steps:

1. Select the type of interval from the first drop-down list: `more than` (strictly higher) or `less than` (strictly lower).
2. In the *Time(s)* field, manually enter the number of desired purchases.
3. Select the type of interval from the first drop-down list: `within`, `beyond` or `between`.
4. In the *Day(s)* field, manually enter the value(s) depending on the chosen interval.

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

{% hint style="warning" %}
For data confidentiality reasons, you cannot target visitors who made their last purchase over a year (365 days) ago.\
Keep in mind that this duration is depending on your browser settings and policy.
{% endhint %}

You can also refine targeting by adding advanced conditions, thus defining the last purchase based on:

* payment method;
* delivery method;
* SKU code of the product;
* product category;
* transaction amount;
* coupon used.

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

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

Example: a segment with people that have made more than 5 purchases within the last 30 days using an American Express card.\
All the values that need to be filled in are your websites’ variables. **You have to enter the exact string (without quotes)**: `Paypal`, `clickandcollect` etc. and match the spaces and special characters.\
However, you don’t need to match lowercase and uppercase letters. For example, `Paypal` and `paypal` will both work. You don’t need to specify the currency, just enter the amount in your website’s currency.

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

Within the tag, we created an object called **`ABTastyData`** that contains information about your visitors’ journey. Inside this object, we store transactional data in locations called **transaction** and **items**.

This is performed when you integrate the transaction tag on your website. With that integration, the generic tag receives [***hits***](https://developers.abtasty.com/docs/data/universal-collect/uc-hits#transaction) from the transactional tag when your visitor validates a transaction.

**Need additional information?**

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

Always happy to help!

<figure><img src="/files/LbR7zgEm7gK6AsYoWb6l" alt="" width="146"><figcaption></figcaption></figure>


---

# 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/purchase-frequency-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.
