Lists

How are URL query string parameters handled in the Lists tool?

Last updated: February 21, 2017

Available For:

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

Query string parameters are added to your website URLs if you are using tracking URLs to track a visit from a certain source and campaign, if you are 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 out UTM parameters from the visited URLs stored on contact records, so when creating a list based on Page View, contacts who have viewed pages with UTM parameters in the query string will not be added to the list.

In the examples below, we'll use three example contacts who have all viewed different versions of the same page, with different or no query strings. In each example, we'll look at how the Lists tool will handle the query string in evaluating whether or not the contacts meet the criteria for the list.

  • 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 we are tracking with a different query string, http://www.domain.com/pricing?specialdiscount.
  • Contact 3 has viewed the pricing page by organically navigating through our website and viewed the page without a query string, http://www.domain.com/pricing.

In one example, you create a list 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

URL containing
URL containing

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

  • Contact 1 will not be added to the list 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 evaluation is /pricing. That does not match what the list is looking for, which is /pricing?utm_source=email.
  • Contact 2 will not be added to the list because they viewed a URL containing /pricing?specialdiscount and non-UTM query string parameters are not stripped from the contact record. That does not match what the list is looking for, which is /pricing?utm_source=email.
  • Contact 3 will not be added to the list because they viewed a URL containing just /pricing, which does not match what the list is looking for, /pricing?utm_source=email.

In another example, you create a list 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:

partofurl2
  • Contact 1 will not be added to the list 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 evaluation is /pricing. That does not match what the list is looking for, which is /pricing?special discount.
  • Contact 2 will be added to the list because they viewed a URL containing /pricing?specialdiscount and non-UTM query string parameters are not stripped from the contact record. Their viewed page URL does match what the list is looking for, which is /pricing?specialdiscount.
  • Contact 3 will not be added to the list because they viewed a URL containing just /pricing, which does not match what the list is looking for, /pricing?specialdiscount.

In a third example, you create a list of contacts who have viewed a URL containing /pricing without any query string parameters:

partofURL3
  • All 3 contacts meet the criteria because they have all viewed the page containing /pricing; it does not matter if they viewed the page with or without the query string in this example.

In a final example, you create a list of contacts who have viewed the exact URL for your email campaign, http://www.domain.com/pricing?utm_source=email. When creating a list based on Page View and using the Contact has visited exact URL operator, HubSpot strips the UTM parameters from the inputted URL. Therefore, this list is really looking for contacts who have viewed the exact URL http://www.domain.com/pricing:

  • Contact 1 will be added to the list 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 evaluation is http://www.domain.com/pricing. That matches the URL the list is looking for.
  • Contact 2 will not be added to the list because they viewed the URL with a non-stripped query string attached, http://www.domain.com/pricing?specialdiscount. That does not match what the list is looking for, which is http://www.domain.com/pricing.
  • Contact 3 will be added to the list because the exact URL they visited is http://www.domain.com/pricing, which is exactly what the list is looking for as the UTM parameters are stripped from the URL in the list criteria.

Was this article helpful?