Lists

How are URL query string parameters handled in lists and workflows?

Last updated: May 18, 2018

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A
Service: N/A

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

HubSpot strips UTM parameters from the visited URLs on contact records (e.g. www.domain.com/page?utm_source=string), so when you set up criteria for a list or workflow based on Page view and include UTM parameters, contacts who have viewed pages with UTM parameters in the query string will not be added to the list or workflow. HubSpot will not strip non-UTM query strings from visited URLs on contact records (e.g. www.domain.com/page?string).

The scenarios below use three contacts who have all viewed different versions of the same page, with different or no query strings. Each scenario illustrates how the lists and workflows tools will handle the query strings in evaluating whether or not the contacts meet the criteria.

  • 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, which is 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.
  1. You create a list or workflow to pull in contacts who have viewed your pricing page as a part of your email campaign using the Contact has visited URL containing list operator set to /pricing?utm_source=email
list-1
URL containing

HubSpot strips out UTM parameters from the visited URLs stored on contact records, but the list or workflow is still looking for contacts who have visited the URL with that exact query string.

  • Contact 1 will not be added to the list or workflow because the ?utm_source=email part of the URL they viewed is stripped on their contact record, meaning the part of the URL they viewed in terms of the list or workflow evaluation is /pricing. This doesn't match the criteria, which is /pricing?utm_source=email.
  • Contact 2 will not 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 doesn't match the criteria, which is /pricing?utm_source=email.
  • Contact 3 will not be added to the list or workflow because they viewed a URL containing just /pricingThis doesn't match the criteria, which is /pricing?utm_source=email.
  1.  You create a list or workflow to pull in contacts who have viewed your pricing page as a part of your other campaign using the Contact has visited URL containing list operator set to /pricing?specialdiscount.
list4
  • Contact 1 will not be added to the list or workflow because the ?utm_source=email part of the URL they viewed is stripped on their contact record, meaning the part of the URL they viewed in terms of the list or workflow evaluation is /pricing. This doesn't match the criteria, which is /pricing?special discount.
  • 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, which is /pricing?specialdiscount.
  • Contact 3 will not be added to the list or workflow because they viewed a URL containing just /pricingThis doesn't match the criteria, which is /pricing?specialdiscount.
  1. You create a list or workflow to pull in contacts who have viewed a URL containing /pricing without any query string parameters.
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.
  1. You create a list or workflow to pull in contacts who have visited the exact URL for your email campaign, http://www.domain.com/pricing?utm_source=email. 

When creating a list or workflow based on Page view and using the Contact has visited exact URL operator, HubSpot strips the UTM parameters from the criteria URL as well. Therefore, the list or workflow is really looking for contacts who have viewed the exact URL http://www.domain.com/pricing:

list-3

  • Contact 1 will be added to the list or workflow because the ?utm_source=email part of the URL they viewed is stripped on their contact record, meaning the exact URL they viewed in terms of the list or workflow evaluation is http://www.domain.com/pricing. This exactly matches the criteria.
  • 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, which is 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/pricingThis exactly matches the criteria.

Was this article helpful?