Skip to content
FunnelGuard

Fix guide by FunnelsGuard

UTMs not written to CRM contact fields: how to find and fix it

TRK-270High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

UTMs are tags such as utm_source, utm_medium and utm_campaign added to a link so you know where a visitor came from. A CRM is the system where your leads and customers are stored. This issue means a lead arrives in the CRM, but the contact fields for source, medium or campaign are empty or hold the wrong values.

Why it costs you leads or sales

The leads still come in, so nothing looks broken. But you cannot connect a closed deal to the ad or email that started it. Reports show "direct" or "unknown", so budget decisions are made on bad data. You may cut a campaign that works and keep one that does not.

Where the UTMs get lost
  1. Ad clickURL has utm_source and utm_campaign
  2. Landing pageUTMs visible in the URL
  3. Next page / formUTMs not stored, hidden fields stay empty
  4. CRM contactSource and campaign fields blank
  5. Revenue reportDeal shows as direct or unknown

The visit is tracked and the lead is captured, but the campaign data drops out between the page and the CRM.

Leads with a campaign recordedExample numbers
Leads with a campaign recorded (example)Before fix: 18 %; After fix: 92 %035711892Before fixAfter fix%

Example: share of CRM leads that carry a utm_campaign value before and after fixing persistence. Numbers are illustrative.

How to check if your site has it

Test it by hand
  1. Open a tagged URL

    Visit your landing page with ?utm_source=test&utm_medium=manual&utm_campaign=utm-check in a private window.

  2. Browse to the form

    Click through to a second page, then open the form. Do not use the back button.

  3. Inspect the hidden fields

    Right-click the form, choose Inspect, and search for utm_source. The field value should be test.

  4. Submit and look up the contact

    Submit with a test email, then open that contact in your CRM and read the source, medium and campaign properties.

  5. Compare

    If the values are blank, find which step lost them: storage, hidden field or CRM mapping.

Where to look based on what you see
What you seeLikely cause
Hidden field empty in the pageUTMs not captured or stored, or the field name does not match
Hidden field filled, CRM blankForm field not mapped to a CRM property
CRM shows the right value on the first visit onlyValues overwritten on later visits
Only works on the landing pageNo persistence across pages

How to fix it

The fix has three parts: store the UTMs when the visitor arrives, copy them into hidden form fields, and map those fields to CRM properties. The code below handles the first two for any form.

Store UTMs for the visit and fill hidden fieldsjavascript
(function () {
  var keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content'];
  var params = new URLSearchParams(window.location.search);
  keys.forEach(function (k) {
    var v = params.get(k);
    if (v) { try { sessionStorage.setItem(k, v); } catch (e) {} }
  });
  document.addEventListener('DOMContentLoaded', function () {
    keys.forEach(function (k) {
      var v = null;
      try { v = sessionStorage.getItem(k); } catch (e) {}
      if (!v) return;
      document.querySelectorAll('input[name="' + k + '"]').forEach(function (el) {
        el.value = v;
      });
    });
  });
})();
Add and map the fields on your platform
  1. Add hidden fields

    In your form plugin (for example Gravity Forms, WPForms or Contact Form 7), add hidden fields named exactly utm_source, utm_medium, utm_campaign, utm_term and utm_content. Exact options vary by plugin.

  2. Add the script

    Place the snippet in your theme footer or a header and footer plugin so it loads on every page.

  3. Map to the CRM

    In the CRM integration settings of the form, map each hidden field to its CRM property.

How to confirm it's fixed

After the change
  • Hidden fields hold the right values after you click through two pages.
  • A test lead appears in the CRM with source, medium and campaign filled.
  • The values match the URL you used, not a placeholder.
  • A second tagged visit does not wipe the original values if you want first-touch.
  • Test contacts are deleted or tagged so they do not pollute reports.

How to prevent it happening again

This breaks quietly when a form is rebuilt, a theme changes, a plugin updates or a field is renamed. Keep a list of the hidden field names and CRM properties, and retest after any change to forms, redirects or tag setups. Test with a tagged URL, not by looking at the form alone.

How campaign data drops out

The tags are present on arrival but missing when the lead is saved.

How FunnelGuard handles this

FunnelGuard detects this issue. A robot visitor opens your site with marked test traffic, follows the journey to your lead form, and submits a test lead. Its utm_persistence check looks at whether the UTM values survive to the submission, and a CRM lookup checks whether they were written to the contact. If they are missing, the failure is re-checked from a second region, then one alert goes out with a screenshot and a likely cause.

Plans start with a Free tier (1 site, 2 journeys, daily checks, no card). Paid plans have a 3-day free trial.

Questions people ask

Why are my UTMs not showing in my CRM?

Usually the UTMs are in the first page URL but are not stored, so the form has nothing to send. Other causes are missing hidden fields, mismatched field names, or form fields not mapped to CRM properties. Test with a tagged URL to see which step loses them.

How do I pass UTM parameters to a CRM form?

Add hidden fields named after each UTM, fill them from the URL or from stored values with a small script, and map them to CRM contact properties in the form or integration settings. Then submit a test lead and check the contact.

Why are my hidden UTM fields empty?

The script may not run on that page, the field names may not match, or the form may load after the script has finished. Visitors who arrive on one page and fill a form on another also lose the tags unless you store them.

Do UTMs persist across pages automatically?

No. UTMs live in the URL and disappear when the visitor goes to a link without them. You need to store them in sessionStorage, localStorage or a cookie on arrival, subject to your consent rules.

Should I use sessionStorage or a cookie for UTMs?

sessionStorage lasts for the tab session and is simple. A cookie or localStorage can keep values for returning visitors, but check your privacy and consent obligations first.

Why does my CRM show the wrong source after a second visit?

A later visit can overwrite the first values if the form always writes to the same property. Use separate first-touch and last-touch properties, or set the field to write only when empty.

How can I test that UTMs reach my CRM?

Open your landing page with test UTMs in a private window, click through to the form, submit a test email, then open the contact and read the UTM properties. FunnelGuard can run this check on a schedule.

Can FunnelGuard tell me when UTMs stop reaching the CRM?

Yes. It submits a marked test lead, checks UTM persistence and looks up the contact in the CRM. If values are missing, it sends one alert with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: utm_persistence payload / CRM lookup.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.