Skip to content

Filter out HubSpot's email trackers from URLs #9019

Description

@fmarier

The following query string parameters are used by HubSpot:

  • _hsenc
  • _hsmi
  • __hssc
  • __hstc
  • __hsfp
  • hsCtaTracking

The ones that start with double underscores are tied to cookies though they are also added to URLs.

According to https://knowledge.hubspot.com/email/links-in-emails-or-ctas-lead-to-an-error-page,
_hsenc tracks the identity of the user who clicked on the email.

They have a number of other ad-related query string parameters which do not tie back to an individual. In particular hsa_acc, hsa_cam, hsa_grp, and hsa_ad map to account ID, campaign ID, ad set ID, and ad ID respectively.

Based on the examples I found on Google:

  • https://www.kaspersky.com/?utm_campaign=DM1803US-KAS&utm_source=hs_automation&utm_medium=email&utm_content=61943687&_hsenc=p2ANqtz-9CCi0_DS3jtutvTinArk34tAszuq7xG7pEtsDqlUdZzgPcPmkJdLEd9B5e2O17uqs7U29rxsQiUWOrbiOpxbohyWLAkK4ah0blhC0U7mvgHtmCcWE&_hsmi=61943687
  • https://www.netguru.com/hubfs/Downloadables/Mobile%20Analytics%20Comparison.pdf?utm_campaign=%5BS%5D%20mobiledev&utm_medium=email&_hsenc=p2ANqtz-89X7vHUlo85kO9K_OchfKFWHe5HTWbgG9Lw_3kPHEHZBl985uCAv-k7dXKuIX9DV17jUGqqpJhDDtkhAwTEvj-lAeeOQ&_hsmi=58517518&utm_content=58517518&utm_source=hs_automation&hsCtaTracking=2871793b-e6ce-42c7-8977-7b0a3d7d3915%7C2b401771-c713-4fd9-aa59-4d3eaef6f109

it looks like _hsmi is relatively low-entropy.

hsCtaTracking, __hssc, __hstc and __hsfp are high-entropy though and are
involved with Calls-To-Action tracking.

So we should add the following to our query string filter:

  • _hsenc
  • __hssc
  • __hstc
  • __hsfp
  • hsCtaTracking

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions