How to update automated UTM codes

Good afternoon.

Our team setup a personalization token that we add to our links which just contains a user’s ID number, and by adding this to the end of our URLs we’ve been able to track people who click on our HubSpot email links using our CDP. If needed for reference, the token we use is esp_id={{contact.hs_object_id}}

We found, however, that the token is not being added to our automated and transacational emails.

After reaching out to the team members who manage those emails, they weren’t sure how to add the code, as they said that all they do is add just a regular website link into the email (like www.ourwebsite.com), and then HubSpot adds all the tracking codes/UTM codes for them, like . Is there a single place in HubSpot where we can go update the codes that HubSpot automatically adds to our links, so that the platform will update all the links in all our emails on its own? We send a lot of automated and transactional content.

I was thinking if that’s not possible, would it still work alright if we go manually update all the base links in the body of each email so that the token is at the end of the URL? And then HubSpot would still add all the automated UTM codes at the end like how it’s been doing, like utm_content, utm_source, etc. So it would be like:

www.ourwebsite.com?esp_id={{contact.hs_object_id}}

Thank you.

Hey @ymt77,

Hey there! If you’re looking to automatically append the personalization token (esp_id={{contact.hs_object_id}}) to URLs in all your automated and transactional emails in HubSpot, there’s not a single central place to update all UTM parameters that HubSpot automatically appends to links. HubSpot generally handles UTM parameters automatically for tracking purposes, but appending additional custom parameters like your personalization token needs to be done manually for each link.

Here’s what you can do:

  1. Manual Update: Manually add your token to the base URLs in your email templates, as you suggested. For example, your URL would look like www.ourwebsite.com?esp_id={{contact.hs_object_id}}. HubSpot will still append UTM parameters after your custom parameters.
  2. Email Template Configuration: Edit the HTML of your email templates to include this token in the hyperlink structure. This way, whenever the template is used, your links will automatically have the personalization token.
  3. Consistency Check: Make sure to update all existing email templates and workflows that include links to ensure the token is included going forward.
  4. Test Before Sending: Always test your emails with a few internal contacts to ensure that the personalization token and UTM parameters are appended correctly and that they work as intended with your CDP.

Adding the token manually to each link is a bit of extra work, but it’s a reliable way to ensure the token is included in all the right places and tracked appropriately. If you find this process a bit cumbersome as you scale, consider reaching out to a HubSpot solutions partner who might offer a more automated approach through custom integration or scripting within HubSpot.

Good morning.

Thank you so much for the thorough response! I will connect with my team and see if we can update all the base links in our emails, then.

Thank you.