Source: https://nishanth-fern-test.docs-staging.pageloop.ai/analytics/pop-ups-showing-to-incorrect-cohort-of-users

# Pop-ups are showing to incorrect Cohort of users

## Issue

You've configured a Pop-up to show to a specific group of users in certain countries, such as Canada and the United States of America (USA), using [Cohorts as Visibility Rules](/desktop/add-cohorts-as-visibility-rules). However, users in other countries are also seeing the Pop-up.

## Probable Cause

The issue occurs due to the time filter set in the Cohort. You might have used the **Anytime** filter while creating the Cohort.

![cohort\_country\_condition.png](/images/7a/cohort_country_condition-7afa9526.png)

The **Anytime** filter includes any user who has logged in from Canada or the USA within the last 30 days, regardless of their current location. A user could be in India today but still see the Pop-up as long as their country was Canada at some point within the last 30 days.

## Suggested Solution

To ensure that the Pop-up is displayed only to users currently in the targeted countries, update the Cohort's time filter from **Anytime** to **Most recently**. Updating the filter ensures that users who have changed their country within the last 7 or 30 days are still able to view the Pop-up based on their current location.

Use the following steps to create a Cohort with the **Most recently** filter:

1. On the [Whatfix Analytics dashboard](/analytics/how-can-i-access-the-product-analytics-dashboard), click **Audience**. ![ia\_left nav\_audience](/images/4c/ia_left-nav_audience-4c6f6d55.png)

2. Click **Cohorts**. ![Click\_coharts](/images/ac/Click_coharts-acdfa4ca.png)

3. Click **Create cohort**.

![](/images/82/analytics_create_cohort-826feac7.png)
2\. Click the **Give your cohort a name** textbox and enter a name for your Cohort.

![](/images/c5/cohort_enter_a_name-c51c1ce4.png)
3\. Click **Add rule**.

![](/images/d4/2022-09-27_12-54-01-d4cf1838.png)
4\. Select **Has attribute** from the dropdown menu. The rule groups users based on attributes, such as country, city, browser, and OS.

![cohort\_builder\_has\_attribute.png](/images/dc/cohort_builder_has_attribute-dca880b9.png)
5\. Select the user attribute that you want to track, such as **Country**.

![cohort\_builder\_country.png](/images/0f/cohort_builder_country-0fdc9ca9.png)
6\. Select the comparison operator, such as **Equals**.

![cohort\_builder\_comparison\_operator.png](/images/c0/cohort_builder_comparison_operator-c016e803.png)
7\. Select the value of the attribute (for example, Canada) and then click **Apply**.

![cohort\_builder\_select\_value\_of\_attribute.png](/images/54/cohort_builder_select_value_of_attribute-5436d6a9.png)
8\. Select **Most recently**.

![cohort\_builder\_select\_most\_recently.png](/images/31/cohort_builder_select_most_recently-31ab20af.png)
9\. Select the required timeframe. For example, during the last 7 or 30 days.

![cohort\_builder\_select\_timewindow.png](/images/af/cohort_builder_select_timewindow-aff05988.png)

> [!INFO]
>
> Here’s how you can create the Cohort.
>
> ![cohort\_builder\_most\_recently\_rule.png](/images/ad/cohort_builder_most_recently_rule-adbd2fa9.png)

10. Click **Refresh** to view the number of users included in the Cohort.

![](/images/f5/cohort_refresh-f539ba4b.png)
11\. Click **Save**.

![](/images/70/cohort_click_save-7036e7c3.png)

> [!WARNING]
>
> - Add the Cohort to your Pop-up Visibility Rules. For more information, see [Add Cohorts as Visibility Rules](/desktop/add-cohorts-as-visibility-rules).
> - [Preview the Pop-up](/web/preview-pop-ups) and [push it to Production](/web/pushing-whatfix-content-to-production).
> - If the issue persists, contact [support@whatfix.com](mailto:support@whatfix.com?subject=Pop-ups%20showing%20to%20incorrect%20Cohort%20of%20users\&body=Hi%20team%2C%0A%0APop-ups%20are%20appearing%20for%20the%20incorrect%20Cohort%20of%20users.%20Please%20help.%0AENT%20ID%3A%0A).
