Lists

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

Last updated: August 16, 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 or 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 UTM parameters from the visited URLs on contact records, 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.

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 and workflows tools will handle the query strings in evaluating whether or not the contacts meet the criteria for enrollment.

  • 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 our website and viewed the page without a query string, http://www.domain.com/pricing.

In one example, 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

URL containing
URL containing

As mentioned above, 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 enrollment evaluation is /pricing. That does not match what the list or workflow is looking for, 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. That does not match what the list or workflow is looking for, which is /pricing?utm_source=email.
  • Contact 3 will not be added to the list or workflow 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 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. That does not 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. The contact's viewed page URL does match the criteria, 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 the criteria, /pricing?specialdiscount.

In a third example, you set your criteria to enroll contacts in the list or workflow 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 set up a list or workflow to include 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 criteria URL as well. 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 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 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 or workflow because they viewed the URL with a non-stripped query string attached, http://www.domain.com/pricing?specialdiscount. That does not match the criteria URL, 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/pricing, which exactly matches the criteria URL as the UTM parameters are stripped from the URL when using the Contact has visited exact URL operator.

Was this article helpful?