Understand targeting rules in CTAs and chatflows
Last updated: August 15, 2025
Available with any of the following subscriptions, except where noted:
|
With targeting rules, you can control the CTA or chatflow that your visitors see when they visit your site.
You can set rules based on website URL, query parameters, and the visitor’s information and behavior. Combine the different targeting options to tailor the CTA or chatflow to the specific visitor.
Access targeting settings for CTAs
- In your HubSpot account, navigate to Marketing > CTAs.
- Hover over the CTA and click Edit.
- At the top, click the Targeting tab.
- Continue setting up your targeting rules.
Access targeting settings for chatflows
- In your HubSpot account, navigate to Service > Chatflows.
- Hover over the chatflow and click Edit.
- At the top, click the Target tab.
- Continue setting up your targeting rules.
Website URLs
You can specify the pages a CTA or chatflow should appear on based on the website URL or the query parameters included in the URL.
When targeting visitors based on website URL, you can select a combination of rules to control when your asset should appear. You can use the following targeting rules:
Rule | Behavior | Example |
is all pages | The CTA or chatflow will display on all pages. |
|
is | The CTA or chatflow will display on pages where the URL is exactly as specified in the targeting rule.
|
|
contains | The CTA or chatflow will display on any page where the URL contains the value specified in the targeting rule, including any query parameters. | |
begins with | The CTA or chatflow will display on any page where the URL begins with the value specified. |
|
matches wildcard | The CTA or chatflow will display on any page where the URL has the same structure as the value specified, where * is treated as a wildcard. |
|
Query parameter - is | The CTA or chatflow will display on pages where the query parameter is exactly as specified in the targeting rule. |
|
Query parameter - begins with | The CTA or chatflow will display on pages where the query parameter begins with the value specified. |
|
Query parameter - contains | The CTA or chatflow will display on any page where the query parameter contains the value specified in the targeting rule. |
|
Visitor information and behavior
Add another level of specificity to your targeting rules based on known information about the contact or visitor.
Accounts with Professional and Enterprise subscriptions can create additional filtering rules based on browser language, device type, country, and other types of visitor information.
Contacts
You can hide or show your CTA or chatflow to specific visitors based on the following information:- Segmented lists: if the visitor is a tracked contact in your database with specific list memberships.
- Visitor: if the visitor is a tracked contact in your database or an unknown visitor.
- Logged-in visitor: if the visitor has been identified using the Visitor Identification API, or has logged in to access restricted content on your HubSpot website, blog, or knowledge base.
All visitors (Professional and Enterprise only)
The following rules will be applied based on the detected browser settings of a visitor:
- Device type: the type of device that the visitor is using when they visit your site.
- Browser language: the language the visitor has selected in their browser settings.
- Country: the country where the visitor is from, based on their current IP address.
The rules below will be applied based on whether HubSpot can detect a known cookie associated with a visitor, such as when they previously submitted a form on your website:
- CTA (Legacy) clicked: if the visitor clicked a specific CTA (legacy).
- CTA clicked is: if the visitor clicked a specific CTA.
- Days since last visit: the number of days since the visitor last visited your website.
- When using the filter less than, a first time visitor's days since [action] will be 0. This applies to any new visitors and returning visitors without an existing cookie.
- For example, if you set a filter for Last page visit was less than 7 days ago, new visitors will also be included, since 0 is less than 7.
- Form viewed: if the visitor has viewed a specific form on a page before visiting a page with a CTA or chatflow.
- This targeting rule will not apply to visitors who view the form on the same page as the CTA or chatflow.
- When the form appears on the same page as the CTA or chatflow, the CTA or chatflow will load before HubSpot registers the form view event so the targeting rule will not apply to the visitor.
- Session count: the number of analytics sessions the visitor has had on your website.
- Page visited: if the visitor previously visited a specific page URL.
- Referral URL: if the visitor was linked to your website from a specific page URL.
And/or logic in CTAs or chatflows
You can have multiple different targeting rules set up for your CTA or chatflow. Do note the following behaviors when setting up your rules:
- Within an individual filter group, such asWebsite URL orVisitor information and behavior, OR logic applies. This means that the contact must meet either rule within the group in order for the CTA or chatflow to appear.
- Between filter groups, such as between your Website URL and Visitor information and behavior, AND logic applies. The contact must meet at least one rule in both groups in order for the CTA or chatflow to appear.
For example, if you have set up the following targeting rules for your CTA, the visitor must meet at least one Website URL rule and the Visitor information and behavior rule.
- Rule: Website URL | is | www.hubspot.com/pricing
- Rule: Website URL | is | www.hubspot.com/startups
- Rule: Segmented List | is | Joy's Contacts
The CTA will display when at least one rule in both groups have been met. This includes the following:
- The visitor is on www.hubspot.com/pricing and is a member of the list, Joy's Contacts.
- The visitor is on www.hubspot.com/startups and is a member of the list, Joy's Contacts.
- The visitor is on www.hubspot.com/pricing but is not a member of the list, Joy's Contacts.
- The visitor is on www.hubspot.com and is a member of the list, Joy's Contacts.