Blog

How to pass UTM parameters to a Tally form in WordPress

Hidden fields tell you where each Tally submission came from: the page, the campaign or the placement. Here’s how to fill them on a WordPress site, mostly without writing code.

How hidden fields work

A hidden field is a question your visitors never see. Tally fills it in from the form’s address and saves the value with the submission, next to the visible answers. Hidden fields are free on every Tally plan.

  1. Open your form in Tally.
  2. On a new line, type /hidden and choose the hidden fields block.
  3. Name each field, for example originPage or utm_source, and publish the form.

Use the exact same name in Tally and on your site. Letters, numbers and underscores are the safest choice.

Automatic

Record the page a reply came from

When a Tally form sits on a page, Tally’s script tells the form which page it’s on. Add a hidden field named originPage and every submission records the page’s path, such as /pricing/.

This is handy when one form appears on several pages, and it needs no setup on the WordPress side. It works with Tally’s own embed code and with Embed for Tally, for inline forms and popups alike.

Automatic

Capture UTM parameters

Campaign links usually carry UTM parameters, like this:

https://example.com/pricing/?utm_source=newsletter&utm_campaign=launch

Tally passes every parameter in the page’s address to the form. Add hidden fields with the same names, such as utm_source, utm_medium and utm_campaign, and the values arrive with each submission. Any other parameter works the same way: a ref hidden field picks up ?ref=partner.

The catch: parameters don’t follow visitors around

Tally reads the address of the page the form is on. If someone arrives on your home page from a newsletter link and then clicks through to your contact page, the parameters are gone by the time they reach the form. Point campaign links straight at the page with the form, and use a fixed value, below, as a backup.

Fixed values

Label each form with a fixed value

Sometimes the value doesn’t come from the address at all. You might use one feedback form on three pages and want each placement labelled, or tell a popup apart from an inline copy of the same form.

With Embed for Tally

In the Tally Form block, open the Hidden fields panel and add one key=value pair per line:

source=pricing
placement=sidebar

In the [tally_form] shortcode, used in Elementor, Divi, Bricks and the classic editor, separate the pairs with commas:

[tally_form id="abc123" hidden="source=pricing,placement=sidebar"]

The plugin keeps only letters, numbers and underscores in a field name, so utm-source becomes utmsource. Name your Tally fields to match.

With Tally’s embed code

For an inline form, add the values to the end of the address in data-tally-src:

data-tally-src="https://tally.so/embed/abc123?dynamicHeight=1&source=pricing"

For a popup button, add a data- attribute named after the field:

<button data-tally-open="abc123" data-source="pricing">Contact us</button>

Hidden fields also work when you share a form’s link instead of embedding it. Add the values to the link, starting with ? and joining more with &:

https://tally.so/r/abc123?ref=newsletter&utm_campaign=launch

Email tools such as Mailchimp can fill in a different value for each recipient with their merge tags.

Keep personal details out of links

Tally’s examples sometimes pass an email address in the link. It works, but addresses end up in browser history, server logs and analytics. Stick to labels like the campaign or page, and let people type personal details into the form.

See the results

Open your form in Tally and go to Submissions. Each hidden field has its own column next to the visible answers, so you can sort, filter or export by page, campaign or placement.

If a column stays empty, check that the field name matches exactly, and that the value is in the address of the page the form is on, not a page the visitor saw earlier.

New to embedding Tally forms? Start with the guide to embedding a Tally form in WordPress, or see how to embed a Tally form in Elementor.

Get Embed for Tally

It’s in review on WordPress.org. Leave your email and we’ll send one message when it’s ready to install.