Can I capture UTM parameters with Paperform?

UTM parameters are a specific set of URL parameters which are used to track the effectiveness of marketing campaigns.

https://example.com?utm_source=google&utm_campaign=blackfriday

Paperform automatically captures this data when UTM parameters are added to the form's URL. If you are embedding your form, you can set it to capture the UTMs from the parent URL as well.

This data is available when exporting your form results as a CSV, and you can also send it through to your integrations and webhooks. For additional visibility and control, you may also set up hidden fields to capture UTM parameters directly as form answers.

Embedded forms

If your form is embedded on another web page, you will need to capture the parameters from the parent page. You can do this by adding a special attribute to the HTML code used to embed the form. Simply type prefill-inherit between the opening <div and data-paperform-id, like so:

<div prefill-inherit data-paperform-id="...

This tells the form to inherit all URL parameters (not just UTMs), so it can also be used for pre-filling answers.

Exporting results as a CSV

When exporting your form results as a CSV file, you'll see columns for the five UTM parameters on the far right side of the spreadsheet.

Screenshot of the five columns with UTM parameters (e.g. "UTM Source"), within a spreadsheet of exported results.

These columns are not visible on the results page in Paperform. If you would like to view UTMs there, see the section on adding hidden fields below.

Integrations and webhooks

Direct integrations

If you would like to pass data from your UTM parameters into any direct integrations, you can use these special answer piping properties:

  • {{ device.utm_source }}
  • {{ device.utm_medium }}
  • {{ device.utm_campaign }}
  • {{ device.utm_term }}
  • {{ device.utm_content }}

Simply map these values into your integrations, just as you would with a form answer.

Screenshot of the configuration of a Google Sheets integration, with {{ device.utm_source }} mapped to a certain column, and other UTM values entered in a similar fashion.

Please note that while these special keys do work in direct integrations, they aren't supported in some other places where you can pipe answers (e.g. custom emails). This can be addressed by pre-filling the UTMs into hidden fields instead, allowing you to use regular answer piping with those fields. See the section on hidden fields below for more information.

Zapier, Make, and custom webhooks

You'll see UTM parameters listed as options when using the third-party integration services Zapier and Make (Integromat).

Screenshot of the Zapier integration setup, with values like "Device Utm Source" being selected.

They are also included in the payloads sent to your custom webhooks.

Hidden fields

If you would like to do more with your UTM parameters, you may deliberately pre-fill them into hidden fields. This will capture them as regular form answers, making them visible on your form's results page and available for any kind of answer piping.

Since UTMs are a type of URL parameter, they are already prepared for pre-filling. Follow these steps to capture your UTMs in hidden fields:

  1. Create a new question on the form and change the type to "Hidden." Alternatively, you can type the slash command /hidden into a blank line of the form editor as a shortcut.
  2. Select the field, the locate the custom question ID at the bottom of the right sidebar.
  3. Set the custom question ID to the parameter name as it will be shown in the URL (utm_source, utm_medium, etc).
  4. Repeat with a new hidden field for each parameter that you would like to capture.
Screenshot of a Hidden field titled "UTM Source" with the custom question ID set to "utm_source"

Remember; if your form is embedded, you will still need to add prefill-inherit to the HTML as described earlier in this article.