UTM Tracking Guide

×

Get a Free Quote

Fill out the form and we’ll respond quickly.

HubSpot Playbook: Configuring UTM Tracking for Attribution and Conversion

Objective

Implement a structured UTM tracking system in HubSpot to enhance marketing attribution, improve conversion insights, and ensure accurate data flow across contact and deal records.

This guide will walk you through setting up a comprehensive UTM tracking system that automatically captures first-touch and last-touch attribution data, helping you understand which marketing channels and campaigns drive the most valuable leads.

Prerequisites

Access Requirements

You'll need one of the following access levels to complete this setup:

Option 1: Super Admin Access

Option 2: The following specific permissions:

  • Marketing: Forms access
  • Automation: Workflows Edit
  • Account Settings: Edit property settings

Understanding UTM Parameters

Before you begin setup, it's important to understand the UTM parameters you'll be tracking. These are the building blocks of your attribution system.

The Five Core UTM Parameters

UTM_source

  • Identifies where the traffic is coming from
  • Examples: LinkedIn, Google, Newsletter

UTM_medium

  • Specifies the type of marketing channel
  • Examples: social, email, CPC

UTM_campaign

  • Names the campaign associated with the link
  • Examples: "Spring_Webinar", "Q1_Product_Launch"

UTM_term

  • Typically used for paid search to track keywords
  • Can also help categorize links within a campaign

UTM_content (Optional)

  • Differentiates similar links within the same campaign
  • Useful for A/B testing different ad variations

Step 1: Create UTM Contact Properties

The first step is to create custom contact properties in HubSpot that will store your UTM data. You'll create three sets of properties: current UTMs, First Conversion (FC) UTMs, and Last Conversion (LC) UTMs.

Creating the Base UTM Properties

  1. Navigate to Settings (Gear Icon) > Data Management > Properties
  2. Click Create Property and configure the following settings:
    • Object Type: Contact
    • Group: Web Analytics History
    • Field Type: Single-line text
  3. Create a property for each UTM parameter:
    • UTM_source
    • UTM_medium
    • UTM_campaign
    • UTM_term
    • UTM_content (optional)
  4. Save each property after creation
  5. After creating the base properties, clone each one to create First Conversion (FC) and Last Conversion (LC) versions:

First Conversion Properties:

  • FC_utm_source
  • FC_utm_medium
  • FC_utm_campaign
  • FC_utm_term

Last Conversion Properties:

  • LC_utm_source
  • LC_utm_medium
  • LC_utm_campaign
  • LC_utm_term

Why This Matters

By creating these properties, we can track and analyze how contacts first interacted with our content (First Conversion) and what led to their most recent engagement (Last Conversion). This gives you both first-touch and last-touch attribution data—critical for understanding the full customer journey.

Step 2: Add Hidden UTM Fields to Forms

Now that your properties exist, you need to add them to your forms as hidden fields. This allows HubSpot to automatically capture UTM data when someone submits a form, without requiring any input from the user.

Adding UTM Fields to Forms

  1. Go to Marketing > Lead Capture > Forms
  2. Select the form you want to edit
  3. In the form editor, search for and add the UTM properties you created:
    • UTM_source
    • UTM_medium
    • UTM_campaign
    • UTM_term
    • UTM_content (if you created this field)
  4. Set each field as a hidden field to capture data without user input
  5. Save the form
  6. Repeat this process for all relevant forms on your website

Pro Tip

Make it a standard practice to include these hidden UTM fields in your form templates so that all new forms automatically include them.

Step 3: Configure the UTM Tracking Workflow

This is the heart of your UTM tracking system. The workflow will automatically populate your First Conversion and Last Conversion properties based on when contacts submit forms.

Setting Up Enrollment Criteria

  1. Navigate to Automation > Workflows
  2. Click Create Workflow and select Contact-Based Workflow
  3. Name your workflow (e.g., "UTM Tracking - First & Last Conversion")
  4. Define enrollment triggers using OR logic:
    • UTM_source is known OR
    • UTM_medium is known OR
    • UTM_campaign is known OR
    • UTM_term is known OR
    • UTM_content is known
  5. Enable re-enrollment to allow repeat tracking for returning contacts

Creating Branch Logic for First & Last Conversion

The workflow needs to determine whether this is a contact's first form submission (First Conversion) or a subsequent submission (Last Conversion).

  1. Add a Branch Action to the workflow
  2. Name the first branch "First Conversion"
  3. Set the branch criteria:
    • IF Number of Form Submissions = 1, route to First Conversion branch
    • ELSE, route to Last Conversion branch

Updating First Conversion Properties

In the First Conversion branch:

  1. Add an Edit Record action
  2. Update FC_utm_source with the value from UTM_source
  3. Add another Edit Record action
  4. Update FC_utm_medium with the value from UTM_medium
  5. Repeat for FC_utm_campaignFC_utm_term, and FC_utm_content

Important: Updating Last Conversion After First Conversion

After updating the First Conversion properties, add a Go to Action step and direct it to also update the Last Conversion properties. This ensures that after the first form submission, both First Conversion and Last Conversion fields hold the same values.

Updating Last Conversion Properties

In the Last Conversion branch (or after the Go to Action):

  1. Add an Edit Record action
  2. Update LC_utm_source with the value from UTM_source
  3. Add another Edit Record action
  4. Update LC_utm_medium with the value from UTM_medium
  5. Repeat for LC_utm_campaign, LC_utm_content, and LC_utm_term

Clearing UTM Fields

After capturing the data, you need to clear the temporary UTM fields so they're ready for the next submission:

  1. Add a 5-minute delay before clearing data
    • This ensures HubSpot has time to use the UTMs to enrich any other necessary properties
  2. Use Edit Record actions to clear each field:
    • Clear UTM_source
    • Clear UTM_medium
    • Clear UTM_campaign
    • Clear UTM_term
    • Clear UTM_content

Why This Workflow Matters

This workflow automates the tracking process, ensuring that you retain first-touch attribution while also capturing ongoing engagement from returning leads. Without this automation, you would lose valuable data every time a contact submits a new form.

Step 4: Test & Activate

Before going live, it's critical to test your setup to ensure everything works correctly.

Testing Your Setup

  1. Run test submissions with UTM-tagged URLs
  2. Verify UTM properties populate correctly in contact records
  3. Check workflows to ensure data flows correctly
  4. Test re-enrollment by submitting another form
  5. Activate workflows and monitor performance

Ongoing Maintenance & Best Practices

Regular Monitoring

  • Monitor UTM data regularly for inconsistencies or missing values
  • Ensure all new forms include hidden UTM fields
  • Review workflows quarterly to optimize efficiency and catch any issues
  • Train team members on proper UTM tracking and reporting

Campaign Implementation

  • Marketing teams should use UTMs for all campaigns to ensure proper attribution
  • Use consistent naming conventions for UTM parameters across your organization
  • Document your UTM strategy so everyone follows the same standards

Helpful Tools

Use the Google Campaign URL Builder to easily create UTM-tagged URLs: Google Campaign URL Builder

Why Accurate Tracking Matters

Accurate and consistent UTM tracking enables reliable reporting, helping marketing and sales teams understand which channels and campaigns drive the most valuable leads. This data is essential for:

  • Proving marketing ROI
  • Optimizing budget allocation
  • Understanding the customer journey
  • Making data-driven decisions about which campaigns to scale
cs-hero

Who created this guide?

👋 Hi! My name is Casey Hawkins!

a HubSpot consultant and digital marketing strategist. I help businesses streamline their marketing systems, automate workflows, and get the most out of HubSpot

Optimize, automate, and grow with expert HubSpot guidance.

author-sig