Lists

URL query string parameters in list and workflow criteria

Last updated: June 21, 2019

Applies to:

Marketing Hub  Professional, Enterprise
Legacy Marketing Hub Basic

Query string parameters are added to your website URLs when you use tracking URLs to track a visit from a certain source and campaign, or pass values in the URL. They're also used in some external CMS systems to display specific content on a page.

HubSpot strips UTM parameters from the visited URLs in contact records (e.g. www.domain.com/page?utm_source=string). Hence, when a contact visits a URL with UTM parameters, this will not be stored in their Page view property.

Because of this, when you include UTM parameters in a criteria for a list or workflow based on Page view, contacts who viewed pages with UTM parameters in the query string will not be added to the list or workflow.

However, HubSpot will not strip non-UTM query strings from visited URLs on contact records (e.g. www.domain.com/page?string).

The example scenarios below illustrates how the lists and workflows tools handle query strings when evaluating whether a contact meet its criteria. For purposes of the examples, there are three contacts who viewed the page differently:

  • Contact 1 has viewed the pricing page as a part of an email campaign set up with a tracking URL, http://www.domain.com/pricing?utm_source=email.
  • Contact 2 has viewed the pricing page as a part of a separate campaign, tracked with a different query string, http://www.domain.com/pricing?specialdiscount.
  • Contact 3 has viewed the pricing page by organically navigating through the website and viewed the page without a query string, http://www.domain.com/pricing.

Scenario 1

To add contacts who have viewed the page as a part of your email campaign to a list or workflow, the criteria Contact has visited URL containing, is set to /pricing?utm_source=email

list-1
URL containing

The list or workflow looks for contacts who have visited the URL with that exact query string.

  • Contact 1 will not be added to the list or workflow because ?utm_source=email is stripped from their contact record. The URL they viewed is recorded as http://www.domain.com/pricing. This does not match the criteria as it does not include "/pricing?utm_source=email".
  • Contact 2 will not be added to the list or workflow because they viewed a URL containing /pricing?specialdiscount. This does not match the criteria as it does not include "/pricing?utm_source=email".
  • Contact 3 will not be added to the list or workflow because they viewed a URL containing just /pricing. This does not match the criteria as it does not include "/pricing?utm_source=email".

Scenario 2

To add contacts who viewed the page as part of another campaign to a list or workflow, the criteria Contact has visited URL containing, is set to /pricing?specialdiscount.

list4
  • Contact 1 will not be added to the list or workflow because their viewed page URL recorded is http://www.domain.com/pricing. This does not match the criteria, as it does not contain "/pricing?specialdiscount".
  • Contact 2 will be added to the list or workflow because they viewed a URL containing /pricing?specialdiscount and non-UTM query string parameters are not stripped from the contact record. This matches the criteria, as the recorded URL contains /pricing?specialdiscount.
  • Contact 3 will not be added to the list or workflow because they viewed a URL containing just /pricingThis does not match the criteria, as it does not contain "/pricing?specialdiscount".

Scenario 3

To pull in contacts who have viewed a URL containing /pricing without any query string parameters, the criteria Contact has visited URL containing, is set to /pricing.

list-2

All 3 contacts will be added to the list or workflow. They meet the criteria because they have all viewed the page containing /pricing. In this scenario, it doesn't matter if they viewed the page with or without the query string.

Scenario 4

To add contacts who have visited the exact URL for your email campaign, http://www.domain.com/pricing?utm_source=email, the criteria Contact has visited exact URL is set to the full URL.

list-3

In this case, HubSpot strips the UTM parameters from the criteria URL as well. The list or workflow will hence, look for contacts who have viewed the exact URL http://www.domain.com/pricing, and not the URL containing the query parameters.

  • Contact 1 will be added to the list or workflow because their viewed page URL recorded is http://www.domain.com/pricing. This matches the criteria that the list or workflow is looking for.
  • Contact 2 will not be added to the list or workflow because they viewed the URL with a non-stripped query string attached: http://www.domain.com/pricing?specialdiscount. This doesn't match the criteria, as it is not the exact URL "http://www.domain.com/pricing".
  • Contact 3 will be added to the list or workflow because the exact URL they visited is http://www.domain.com/pricing. This matches the criteria that the list or workflow is looking for.