Collecting Data from UTM Tags Using Hidden Fields

Collecting data from UTM tags using Marketo forms is incredibly easy. I use them to capture lead (person) source data using the utm_medium and utm_source tags.

Example

Let’s say we are doing a promotion with a partner where they will place display ads on their site and send emails to their database, directing people to our site. Here are the links we will use:

Display Ad

https://example.com/abc-page?utm_medium=display-ad&utm_source=partner-name&utm_campaign=product-abc&utm_content=image

Email Link

https://example.com/abc-page?utm_medium=email&utm_source=partner-name&utm_campaign=product-abc&utm_content=image

Mappings

UTM Tag Field in Marketo
utm_medium Person Source
utm_source Lead Source Detail

Marketo Form Builder

Create a form and add the fields you want displayed for users to fill out. You will also create two fields to capture data from the UTM tags, which will be hidden from view.

How to Add Hidden Fields

  1. Click the purple + button.
  2. Find the field you want to add (e.g., Person Source).
  3. In the right sidebar, set Field Type to Hidden.
  4. Ensure Form Pre-Fill is enabled.
  5. Click Edit next to Autofill.
  6. Select URL Parameter from the Get Value From dropdown.
  7. For Parameter Name, enter utm_medium.
  8. Click Save to finish.

Repeat these steps for the Lead Source Detail field, changing step 7 to set the Parameter Name as utm_source.