Skip to main content

URL/UTM Parameter Tracking

Learn how to pass URL and UTM parameters through your funnels to capture attribution data like utm_source, utm_campaign, or gclid — so you can track where your visitors come from and tie responses back to specific campaigns or ad sources.

⭐ Available in the following bundle: Core Bundle

⭐ Bundle included in the following plans: Starter, Growth, Scale, Enterprise

⭐ Available on the following legacy plans: Basic, Pro, Agency, Business

👀 Not sure which plan you're on? Check your subscription here.

In performance marketing, it is often helpful or necessary to pass parameters to the flow and the visitor's response, such as utm_source, utm_campaign, or gclid to identify and track the user.


Overview on UTM Parameters

There are 5 UTM parameters, you can add to your URL:

  • utm_source: The site (source), where your user is coming from, e.g. Google, Instagram, Facebook, etc.

  • utm_medium: The marketing medium, e.g. newsletter, banner, etc.

  • utm_campaign: The individual campaign name, e.g. Summer Sale, Christmas Promo, etc.

  • utm_term: The targeted paid keywords in a designated ad campaign.

  • utm_content: Used to tell apart similar content or links in the same ad. For instance, if you have two buttons in one email, you can use utm_content with different values to see which version works better.

💡 Good to know: Besides these five, platforms such as Google Analytics also use utm_id or utm_source_platform. Heyflow passes them like any other parameter. Values are case sensitive, so use one spelling (e.g. always google, never Google).

You could also find click identifier in your responses, e.g. from Google (gclid), Facebook (fbclid), which are automatically added to the URL.

💡 Tip: You can also use URL parameters for personalization throughout your flow. Check out this article to learn more.

💡 Tip: You can also filter your Analytics dashboard by UTM parameters. Open Analytics and select the UTM values you want to compare.


Setup

Stand-Alone (URL)

These parameters are usually found in the URL, e.g. heyflow.id/myflow?utm_source=Google&utm_campaign=spring01. This URL contains the following two parameters: utm_source and utm_campaign.

With Heyflow, passing these parameters from the URL is quite simple.

To enable UTM parameters, head over to the Settings page of your heyflow. On the Tracking tab, make sure the Pass URL parameters option is on.

🔎 The Pass URL parameters option has two modes:

  • All URL parameters: every parameter in the URL is passed (e.g. utm_source, gclid, fbclid, or your own parameters).

  • All utm_ parameters: only parameters starting with utm_ are passed. Click IDs such as gclid or fbclid and other custom parameters are ignored.

If you need click IDs in your responses, choose All URL parameters and publish your flow again.

🔎 With Pass URL parameters turned on, the allowed URL parameters are automatically included in your responses: in the app, in response emails and in the response data sent to webhooks and response handlers. You don’t need a hidden input field for this. A hidden input field is only useful if you want to map a parameter to a specific field with a fixed name, e.g. a field in your CRM. Learn more below.

💡 Good to know: Each response also contains the fields Full URL (the complete URL including all parameters), Referrer and Page URL. You can find them in your responses and exports.

❗ Important: The query string like ?utm_source=Google&utm_campaign=spring01 must follow the path, e.g. heyflow.id/myflow immediately: heyflow.id/myflow?utm_source=Google&utm_campaign=spring01.

The (optional) screen anchor, e.g. #start must be the last element of the URL: heyflow.id/myflow?utm_source=Google&utm_campaign=spring01#start

❗ Important: If you have duplicated values in your URL parameters, e.g.
​?utm_campaign=abc&utm_campaign=abc will deduplicate,
​?utm_campaign=abc&utm_campaign=foobar, the value in the flow will be always the last one for all implementations and redirects (in this case foobar).


Embedded

If you have embedded your heyflow on a website, you may want to pass all the parameters of the website to the heyflow.

For example, your heyflow could be embedded on your landing page my-website.com and the parameter could be passed in the URL, e.g. like this: my-website.com?utm_source=Google&utm_campaign=spring01.

With our embed code, URL parameters from the website, can be automatically passed to your heyflow. Passing parameters from the website are now synced with your heyflow’s settings and enabled by default.

🔎 Heyflow only reads the URL of the page where the flow is embedded. If visitors land on another page first and then click to your flow page, your website must pass the parameters along, e.g. by adding them to the link or by setting the url-parameters attribute (see below).

Bonus: Manually add URL parameters to embedded Heyflow

Another method to add URL parameters to your (embedded) heyflow, is to define them in the <heyflow-wrapper> tag directly, via the url-parameters attribute like so:

<heyflow-wrapper flow-id="test" url-parameters="utm_source=Google&utm_campaign=spring01"></heyflow-wrapper>

The URL parameters defined here in the tag will be added to those passed read the URL.

❗ The url-parameters attribute must be filled when the heyflow is initialized. Updating the attribute after the heyflow has been loaded will not pass updated parameters.


Pass parameters to response handler or webhooks

When Pass URL parameters is turned on, the allowed URL/UTM parameters are sent automatically as part of the response data to webhooks and response handlers such as HubSpot, Salesforce or HighLevel. A hidden input field is optional: use one if you want a parameter to land in a specific field of your response handler, then map that hidden input field to the corresponding field.

The UTM parameters will then be automatically passed along with each response without your visitors noticing. Combining the referrer field with UTM parameters allows for even more detailed analytics, providing insights into both the immediate source and the pre-click navigation path.

🔎 Want to forward parameters to the page you redirect to after the flow? Capture each parameter with a (hidden) input field with the same variable name and add it to your redirect URL, e.g. https://example.com/thanks?utm_source=@utm_source. Learn more in Redirect to URL with variables.

Did this answer your question?