HubSpot UTM Tracking Integration

Send WordPress UTM attribution from HandL UTM Grabber into HubSpot, including source, medium, campaign, content, term, click IDs, and referrer data.

How to Track UTMs in Hubspot Form

UTM attribution overview

This guide explains How to Track UTMs in Hubspot Form with HandL UTM Grabber. It helps you pass lead attribution into your CRM, email platform, or marketing automation workflow and keep the marketing context needed for accurate reporting across forms, bookings, signups, and sales.

Add UTM fields to your form

This is assuming you already created Contact properties (ideally under Web Analytics) and make sure you name them after HandL UTM Grabber properties (such as utm_campaign, utm_source, gclid, fbclid etc). See the full list here Native WP Shortcodes

Make sure the fields are hidden

Copy paste the form embed code

Clicking the share button will generate the embed code looks like this

Add the following modifications Simply add the onFormReady event as is

<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
	region: "na1",
	portalId: "{portal_id}",
	formId: "{form_id}",
	onFormReady: function(f){
		f.serializeArray().map(x=>{
			let cookie_val = Cookies.get(x.name)
			if (cookie_val && cookie_val != ''){
				f.find('input[name="'+x.name+'"]').val(cookie_val).change();
			}	
		})
	}
});
</script>

That's it! Your form will track the parameters and you'll get all the tracked parameters under submissions in Hubspot (in contact property for the contact)

Send HubSpot UTMs via Zapier or Webhook

UTM attribution overview

This walkthrough covers sending full UTM Grabber data from HubSpot to Zapier, Make, or your own webhook. Handy when you need gclid, fbclid, first-touch fields, or custom params alongside the lead or order.

For the primary setup, see the main HubSpot guide.

When a webhook makes sense

Native fields in HubSpot often stop at basic UTMs. A webhook lets you push everything UTM Grabber stores without trimming values or losing click IDs.

Thank-you page script

Paste this on your confirmation page. Swap in your Zapier or Make hook URL.

<script>
var qvars = {};
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
    qvars[key] = decodeURIComponent(value.replace(/\+/g, ' '));
});
qvars = Object.assign({}, (typeof handl_utm !== 'undefined' ? handl_utm : {}), qvars);
setTimeout(function() {
    var data = new URLSearchParams(qvars).toString();
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open('GET', 'https://hooks.zapier.com/hooks/catch/YOUR_ID/YOUR_KEY/?' + data, true);
    xmlHttp.send(null);
}, 1000);
</script>

Full pattern explained in Triggering Zapier on Thank you Page.

Quick Zapier / Make checklist

  1. Create a Catch Hook trigger and copy the URL
  2. Run a test conversion with UTMs in the landing URL
  3. Confirm gclid, utm_source, and email (if present) show up in the payload
  4. Map fields into your CRM or spreadsheet

Parameter reference: Native WP Shortcodes.

Make users: see Make Integromat integration.

HubSpot Contact Sync

UTM attribution overview

This guide explains how to send UTM data from your WordPress forms to HubSpot contacts with HandL UTM Grabber. It helps you capture UTM source, medium, campaign, term, content, click IDs, referrer, and landing page data and keep the marketing context needed for accurate reporting across forms, bookings, signups, and sales.

HubSpot Contact Sync connects your WordPress site to your HubSpot account. When someone submits one of your WordPress forms, HandL UTM Grabber looks up their email in HubSpot. If the contact exists, it adds where they came from. If not, it creates the contact first. You do not need Zapier, a HubSpot form, or any custom code.

Which guide do you need? Use this guide when your forms are built with a WordPress form plugin: Gravity Forms, Contact Form 7, Ninja Forms, Elementor, WPForms, Fluent Forms, or Formidable Forms. If your forms are HubSpot's own forms embedded on your site, use How to Track UTMs in Hubspot Form instead.

Before you start. You need HandL UTM Grabber v3 with an active license, at least one of the form plugins above with a form that has an email field, and a HubSpot user who is allowed to connect apps to your HubSpot account.

1. Open HubSpot Contact Sync and connect your account

In WordPress, go to UTM, open the Integrations tab, and click HubSpot Contact Sync in the list on the left. Click Connect HubSpot. HubSpot opens and asks which account to connect. Choose your account and approve the connection. HandL UTM Grabber asks for access to contacts and contact properties only.

You are sent back to WordPress when you are done. The card now shows Connected to HubSpot with your HubSpot account under it.

1- Open HubSpot Contact Sync and connect your account

2. Choose where each tracked value is stored

Under HubSpot properties, every tracked value has a dropdown. Pick one of three options for each:

Custom parameters you added under Custom Fields are listed too, and so are the IP address, user agent, and browser IDs. All of these start as Don't send, so pick a property for each one you want in HubSpot.

Click Save property mapping. You can change the mapping later with Edit mapping.

2- Choose where each tracked value is stored

3. Turn on a form and choose its fields

Under Forms, your forms are grouped by form plugin. Turn on the switch next to a form. The form opens so you can tell HandL UTM Grabber which of its fields is which:

Click Save and turn on. The form now shows Syncing. Repeat for every form you want to send to HubSpot.

3- Turn on a form and choose its fields

4. Send a test lead and check the Sync log

Open a page that has the form, add UTM parameters to the address (for example ?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale), and submit the form. Leads are sent in the background, so the result shows in the Sync log within a few minutes. Click Refresh to update it.

The Sync log keeps the last 20 leads. Each one shows a result:

Click Show values on a row to see exactly which tracking values were sent. Click the result to open the contact in HubSpot.

4- Send a test lead and check the Sync log

5. Check the contact in HubSpot

In HubSpot, open the contact and click View all properties. Search for "utm" or scroll to the UTM Grabber group. The properties hold the values from the visit that led to the form submission.

5- Check the contact in HubSpot

How values are updated

When the same person submits a form again, HandL UTM Grabber updates the same contact:

The tracking values come from the form's hidden tracking fields. If the form has none, they come from the visitor's tracking cookies. You decide what is sent. Anything left on Don't send stays in WordPress.

If a lead does not arrive

A lead that cannot be sent is tried again after 1, 5, 15, 30, and 60 minutes. If it still cannot be sent, it shows as Failed in the Sync log.

Disconnect

Click Disconnect on the connection card. New form submissions stop going to HubSpot. Your form settings and property mapping are kept, so you can reconnect later without setting them up again. The contacts and properties already in HubSpot are not changed.

Here we only illustrated the UTM parameters. You can send all the other tracking parameters the same way. See the full list in Native WP Shortcodes.