virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
blog / 2026-11-25

Tally form UTM tracking: from form answer to payment

By Devendra Variya, co-founder of Virling. Published 2026-11-25.

For Tally form UTM tracking, add one hidden field per tag to the form, then pass the values in the address of a tally.so link or through the embed code. Submissions then show their campaign. They do not show who paid later: for that, carry the Virling visitor ID in one more hidden field and join it to the payment.

Tally facts here come from its help and developer pages, linked below and read on 2026-11-25. Virling does not connect to Tally.

Start free trial

Step 1: add the hidden fields

In the form editor type /hidden and add a hidden field for each name below, then publish. Tally says hidden fields are free for all users, and that their values show in the Submissions tab (source: Tally, hidden fields). The last name is only for Virling.

utm_source
utm_medium
utm_campaign
utm_content
utm_term
virling_vid

Step 2: pass the values in a tally.so link

Start with ? and join the values with & (source: Tally, hidden fields):

https://tally.so/r/FORM_ID?utm_source=newsletter&utm_medium=email&utm_campaign=october-launch

When the link is on your own site, add the visitor’s tags and the ID from the virling_vid cookie. This replaces any tags already on the link:

<script>
addEventListener("load", function () {
  var query = new URLSearchParams(location.search), vid = window.virling?.vid?.();
  document.querySelectorAll('a[href^="https://tally.so/r/"]').forEach(function (a) {
    var url = new URL(a.href);
    ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term"].forEach(function (k) {
      var v = window.leadUtm ? leadUtm.tags[k] : query.get(k);
      if (v) url.searchParams.set(k, v);
    });
    if (vid) url.searchParams.set("virling_vid", vid);
    a.href = url.href;
  });
});
</script>

leadUtm comes from the snippet in UTM parameters in hidden form fields, which keeps the tags in a first-party cookie. Put that on every page. Without it, the code reads only the page address.

A link in an email or a post cannot carry the ID, and tally.so does not run your script, so there is no visit. If you want revenue, link to a page of yours with the form embedded.

Step 3: pass the values in an embed

Tally forwards your page’s query parameters to the form. It says this is on by default for popups and full page embeds, and that a standard embed does it only with the HTML snippet or JavaScript (source: Tally, embed your form). So tags on the landing page arrive on their own. Tags from an earlier page do not, and neither does the cookie, which a frame from tally.so cannot read. This standard embed adds both. Use it in place of the script Tally gives you, and replace FORM_ID:

<iframe id="lead-form" data-tally-src="https://tally.so/embed/FORM_ID?dynamicHeight=1"
  loading="lazy" width="100%" height="200" frameborder="0" title="Demo request"></iframe>
<script src="https://tally.so/widgets/embed.js"></script>
<script>
addEventListener("load", function () {
  var frame = document.getElementById("lead-form"), url = new URL(frame.dataset.tallySrc);
  var query = new URLSearchParams(location.search), vid = window.virling?.vid?.();
  var tags = window.leadUtm ? leadUtm.tags : {};
  Object.keys(tags).forEach(function (k) {
    if (!query.has(k)) url.searchParams.set(k, tags[k]);
  });
  if (vid) url.searchParams.set("virling_vid", vid);
  frame.dataset.tallySrc = url.href;
  Tally.loadEmbeds();
});
</script>

The form loads when Tally.loadEmbeds() runs (source: Tally, embeds). For a popup, pass the same values in the hiddenFields option of Tally.openPopup (source: Tally, popups).

Step 4: record the submission

An embed sends your page a Tally.FormSubmitted message with all the answers (source: Tally, JavaScript events). Turn it into a goal, and send the email once as an identify event for payments that cannot carry the ID:

<script>
addEventListener("message", function (e) {
  if (e.origin !== "https://tally.so" || typeof e.data !== "string" || !e.data.includes("Tally.FormSubmitted")) return;
  var fields = JSON.parse(e.data).payload.fields, vid = window.virling?.vid?.();
  var email = fields.find(function (f) { return f.type === "INPUT_EMAIL"; })?.answer?.value;
  window.virling?.("goal", "demo request");
  if (vid && email) fetch("https://app.virling.com/api/event", {
    method: "POST",
    keepalive: true,
    body: JSON.stringify({ n: "identify", u: location.href, s: "yourproduct.com", v: vid, m: email }),
  });
});
</script>

For a form on tally.so, no page of yours gets the message. A webhook brings the same data to your server, with each hidden field as a HIDDEN_FIELDS entry and its name in label (source: Tally, webhooks). Add a signing secret and check the Tally-Signature header, then send the same event with the saved virling_vid as v, a page of your site as u and a User-Agent header, since events with an empty or automated one are dropped. Never send it without a visitor ID.

Virling keeps only a SHA-256 hash of the trimmed, lowercased email with a salt of your site. Cover the email and the visitor ID in your privacy policy.

What Virling can join, and what it cannot

  • It can join the visit to your page, the goal, and a later payment that carries the same visitor ID or, on some providers, the same email.
  • It cannot join a form answer alone. An answer is not a payment, and Virling adds no revenue for one.
  • It cannot join a lead with no visit, such as one who opened a tally.so link from an email and never came to your site.
  • It does not trust the hidden fields as proof. Anyone can edit a value in an address.

A made-up example: campaign A brings 50 submissions and 2 customers who pay $200 each. Campaign B brings 20 submissions and 5 who pay $400 each. Tally shows A ahead. The money is $400 for A, or $8 per submission, and $2,000 for B, or $100.

How a later payment finds its visitor

  • Same browser. The virling_vid cookie is still there. Your server reads it when it creates the checkout, and payment links from Stripe, Polar, Dodo Payments and LemonSqueezy get the ID from the script on your page.
  • Checkout made from the saved lead. Pass the hidden field: for Stripe, client_reference_id: lead.virling_vid || undefined. The field for each provider is in link checkout to visits.
  • Invoice. With no visitor ID, a Stripe, Shopify or WooCommerce payment with the same payer email is credited to the identified visitor and shows Matched by email. Matching is exact and applies to payments synced after the identify. A call booked in Cal.com after the form can carry the visitor ID too, as tracking Cal.com bookings to paid invoices shows.
  • None of these. The payment still counts toward revenue, as Unattributed.

If the form takes the payment

Tally’s payment block charges through the Stripe account you connect (source: Tally, payment forms). That page does not say hidden fields are copied to Stripe, so do not count on the ID being there. Email can match if Stripe has the same address, but Tally takes the money on Next or Submit, and the code above sends the identify only after the form is submitted. A payment synced first stays Unattributed. It is safer to collect the lead in Tally and take the money in a checkout that carries the ID: Redirect on completion can send the lead to your own page with the payment link on it (source: Tally, redirect on completion).

Symptom, cause and fix

SymptomCauseFix
One tag arrives, another does notNo hidden field with that exact nameAdd it, spelled the same, and publish
Tags arrive only on the landing pageThe form is on a later page with no tags in its addressUse the code in step 3 with the cookie snippet
A popup gets tags, a standard embed does notIt was added with Copy embed linkUse the HTML code
The embed stays blankTally.loadEmbeds() did not runCheck the console, and that embed.js loads first
Only virling_vid is emptyScript missing or blocked, cookieless mode, or Tally’s own code loaded the form firstRun window.virling.vid() in the console, and keep only the code in step 3
A submission, but no visit in VirlingThe form was opened on tally.soEmbed it on your site
The lead paid, but shows UnattributedThe ID stayed in Tally, or the payer used another emailPass the ID into checkout
The redirect does nothingPreview mode, where Tally says it does not workTest the published form

Test it in a private window

  1. Open your live page with ?utm_source=test&utm_medium=email. Expected: Virling shows a visit from test.
  2. Scroll to the form and run document.getElementById("lead-form").src in the console. Expected: the tags and virling_vid are in the address.
  3. Submit the form. Expected: the submission has both, and the visitor has a demo request goal.
  4. With a Stripe test key connected, send a test invoice to that email and pay it with a test card. Expected: after the next sync, the payment shows test and Matched by email.

For other tools, read Typeform UTM tracking and Calendly UTM tracking. For a form that gives away a download, read lead magnet revenue tracking.

Frequently asked questions

How do I track UTM parameters in a Tally form?

Add one hidden field per tag, named utm_source, utm_medium and so on, and publish the form. Then put the values after the ? of the tally.so link, or let the embed code forward them from your page. Each submission then carries the tags.

Why are my Tally hidden fields empty?

Often the visitor landed on one page and filled in the form on another, so there were no tags in the page address. Other causes are a hidden field that is missing or spelled differently, a standard embed added with the embed link, and a visit that had no tags.

Can a Tally embed read a cookie from my site?

No. The form is a frame from tally.so, and browsers keep it apart from your cookies. Your page has to read the value and pass it to the form, as the code in step 3 does with the visitor ID.

Does Virling read Tally answers?

No. Virling does not connect to Tally. It sees the visit to your page, the goal your page sends, and the email your page or server sends in an identify event, which it keeps only as a salted hash.

How is a Tally lead joined to a payment?

By visitor ID, if the ID goes into the checkout the lead pays through. Otherwise by email: after an identify event, a later Stripe, Shopify or WooCommerce payment with no visitor ID and the same payer email is credited to that visitor. A form answer alone is never counted as a payment.

See which Tally leads turn into payments

Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.

Start free trial See the demo