Tag: UTM Tracking

  • UTM Parameter Tracking on WordPress: How to Capture Lead Source Data and Keep It

    If you are running paid ads and relying on your ad platform’s dashboard to tell you which campaigns are generating leads, you are missing part of the picture. Ad platforms count clicks. UTM parameters let you count what happens after the click: form submissions, phone calls, and ultimately closed deals.

    This guide covers how UTM parameter tracking works on WordPress, how to pass UTM data through to your lead records, and how to use that data to make better decisions about where to spend your marketing budget.

    What UTM Parameters Are (and Why They Matter)

    UTM parameters are small tags you append to a URL. When someone clicks a link with UTM tags, those values land in the URL bar, and your tracking tools can read them. A tagged URL looks like this:

    https://example.com/landing-page/?utm_source=google&utm_medium=cpc&utm_campaign=summer-promo

    The five standard UTM parameters:

    • utm_source — where the traffic is coming from (google, facebook, email, newsletter)
    • utm_medium — the type of traffic (cpc, organic, social, email)
    • utm_campaign — the specific campaign name (summer-promo, brand-search, retargeting)
    • utm_content — the specific ad or link variant (useful for A/B testing)
    • utm_term — the keyword that triggered the ad (usually auto-populated by Google Ads)

    When these values are in the URL, GA4 can attribute the session to the right source. But GA4 only sees the session — it does not see the lead form submission in the context of the original source unless you capture and store the UTM data yourself.

    The Core Problem: UTMs Die When Someone Submits a Form

    Here is the gap that most WordPress sites have. A visitor arrives from a Google Ads click. Their URL has utm_source=google and utm_campaign=brand-search. They spend 3 minutes on your site, then submit a contact form. That form submission lands in your inbox or CRM with their name, email, and message — but no UTM data. You cannot tell whether this lead came from Google Ads, organic search, or a direct visit.

    Multiply this across 50 leads a month and you have a marketing team making budget decisions based on incomplete information.

    The solution is a two-step process: capture the UTM values when someone first lands, and carry them through to the form submission.

    How to Capture UTM Parameters in WordPress

    Step 1: Store UTMs in a first-party cookie on landing

    When a visitor arrives with UTM parameters in the URL, a small JavaScript snippet reads those values and saves them in a first-party cookie. That cookie persists for 30 days (or whatever window you set), so even if the visitor leaves and comes back without UTMs in the URL, you still have the original attribution data.

    The script runs on page load, checks for UTM values in the URL, and writes them to cookies only if they are present (so a returning visitor’s original attribution is not overwritten by a direct visit).

    // Capture UTMs on first touch, store in cookies for 30 days
    (function() {
      var params = new URLSearchParams(window.location.search);
      var utms = ['utm_source','utm_medium','utm_campaign','utm_content','utm_term'];
      utms.forEach(function(key) {
        var val = params.get(key);
        if (val) {
          document.cookie = key + '=' + encodeURIComponent(val) + '; path=/; max-age=2592000; SameSite=Lax';
        }
      });
    })();

    Add this to your WordPress site via a plugin like WPCode, through your theme’s functions.php, or through Google Tag Manager as a Custom HTML tag triggered on All Pages.

    Step 2: Pull UTM cookies into hidden form fields

    Your contact form (whether it is Gravity Forms, WPForms, Contact Form 7, or another plugin) should have hidden fields that read the UTM cookie values and include them in the submission. When someone submits the form, the UTM values travel with the lead data.

    Hidden field setup (in Gravity Forms as an example): add a Hidden field for each UTM parameter and set its default value to a JavaScript snippet that reads the corresponding cookie. Most form plugins support dynamic default values via a parameter name or a short code.

    The pattern: each hidden field reads its cookie value on page load and populates automatically. The user never sees these fields. The form submission includes both the visible data the user entered and the UTM attribution data you captured in the background.

    Passing UTM Data to Your CRM or Email Platform

    Once UTM values are in your form submission, they need to land somewhere useful. A few options:

    • Email notification: the simplest path — your form sends a notification email that includes all field values. The UTM fields show up alongside name, email, and message. Works immediately with no integration.
    • CRM via Zapier or native integration: map the UTM hidden fields to custom fields in your CRM. Now each deal record shows source, medium, and campaign. When a deal closes, you can trace it back to the originating campaign.
    • Google Sheet as a lead log: route form submissions to a sheet with columns for all UTM parameters plus timestamp, name, email, and message. A simple way to see lead source distribution without a CRM.

    What to Do With UTM Data Once You Have It

    UTM data becomes valuable when you connect it to outcomes, not just volume. A few questions it lets you answer:

    • Which campaigns generate the most leads? Basic source/medium/campaign breakdown. Google Ads vs. organic vs. Facebook vs. email.
    • Which campaigns close at the highest rate? If you track deal outcomes in a CRM, you can pull close rate by utm_campaign. A campaign generating 20 leads at 5% close rate is worth less than one generating 8 leads at 40% close rate.
    • Which keywords drive qualified leads vs. browsers? utm_term populated from Google Ads auto-tagging tells you exactly which search query preceded each lead. You can pause terms that generate volume but not closed business.
    • Which ad variants convert better? utm_content lets you tag individual ads or email links differently. If Ad A and Ad B send equal traffic but Ad A generates twice the form submissions, that is a clear signal.

    gclid vs. UTM: Which Should You Use?

    Google Ads appends a gclid (Google Click ID) to URLs automatically when auto-tagging is enabled. This is separate from UTM parameters and is used for Google’s internal attribution. You should use both.

    • UTM parameters give you source/medium/campaign data that works across platforms and integrates with GA4, your CRM, and any reporting tool you use.
    • gclid enables offline conversion upload to Google Ads — where you send lead outcome data back to Google so its algorithm can optimize toward closed deals, not just form submissions.

    The right setup captures both: UTMs go into cookies and then form fields for your own reporting, while gclid is captured separately for offline conversion sync back to Google Ads.

    Common WordPress Implementation Pitfalls

    • UTMs lost on redirect: if your landing page URL redirects (www to non-www, HTTP to HTTPS, or a tracking redirect), UTM parameters can be stripped. Audit your redirect chain and make sure parameters pass through.
    • Form caching stripping values: some caching plugins prevent JavaScript from running correctly on form pages, which means hidden fields do not populate. Add form pages to your cache exclusion list.
    • Cookie consent blocking the script: if you have a GDPR consent banner that delays non-essential scripts, UTM capture may not fire until after the user accepts. For most service businesses in the US this is not a live issue, but it is worth knowing.
    • Session-scoped storage losing first touch: using sessionStorage instead of cookies means attribution is lost if the user closes their browser and returns later. Use cookies with a 30-day window for first-touch attribution.
    • Overwriting first touch on return visits: your capture script should check whether a UTM cookie already exists before overwriting. If someone clicks an organic result in week 2, you do not want to overwrite the paid ad click from week 1 that actually drove the engagement.

    UTM Tracking as Part of a Larger Attribution Stack

    UTM tracking solves the first-party data capture problem: you own the lead source data, it lives in your CRM, and it survives the gap between ad click and form submission. But it is one layer of a full attribution stack.

    • UTMs tell you source, medium, and campaign at the session level
    • Offline conversion upload connects closed deals back to campaigns in Google and Meta
    • Phone call tracking via DNI (dynamic number insertion) captures attribution for callers who never submit a form
    • Revenue attribution pulls closed deal values back into your reporting so you see revenue by source, not just lead count

    For WordPress businesses running paid search and wanting a turnkey version of this stack — UTM capture, form submission tracking, offline conversion sync, and closed-loop revenue reporting — Sales Provenance is built to handle all of it natively, without requiring a data engineer or a CRM dependency.

    Related reading: Google Ads conversion tracking on WordPress — how to set up website conversions, capture gclid, and upload offline conversions. And closed-loop reporting for WordPress — connecting ad spend to closed deal value.

  • WordPress UTM Tracking: Why Your Setup Has a Gap (and What to Fill It)

    If you run paid ads on Google or Meta, you are already using UTM parameters. You put them on every ad link, your analytics show you which campaigns drove traffic, and the numbers look good.

    The problem shows up two weeks after a campaign ends, when you look at actual sales and try to figure out which campaign drove them. Your analytics shows sessions and leads. Your CRM shows closed deals. The two lists do not match up.

    This is the UTM tracking gap: the click data and the revenue data live in separate systems, and nothing connects them. WordPress UTM tracking solves the first half of the problem (capturing UTMs from clicks into leads). Closing the full loop — all the way to the sale — requires one more step that most WordPress setups skip.

    How UTM Tracking Works (and Where It Breaks)

    When a visitor clicks your Google Ad, the URL they land on includes UTM parameters like ?utm_source=google&utm_medium=cpc&utm_campaign=spring-campaign. Those parameters tell you where the visitor came from.

    A basic WordPress setup reads those parameters from the URL and stores them in the visitor’s browser session. When the visitor fills out a form, the UTM values get submitted along with their name and email. Your CRM or email platform records the lead source.

    This works — until it does not. Common failure points:

    • The visitor leaves and comes back. Most session-based UTM capture only survives a single browsing session. If someone clicks your ad on Monday and books a call on Thursday, the UTM is gone. First-touch or last-touch attribution is wrong.
    • Cross-device visits. Someone sees your ad on their phone, then books a call on their laptop. The UTM never makes it to the form submission.
    • The form is not your form. If you use Calendly, Typeform, JotForm, or any embedded third-party form, UTMs captured on your site often do not pass through to the submission record.
    • Phone calls. Most UTM tracking only works for form fills. A visitor who clicks your ad and calls you instead of filling a form is invisible in UTM reports — even though the ad drove the lead.

    First-Party Cookie Storage: The Fix for Multi-Session Visits

    The standard fix for losing UTMs across sessions is to write them to a first-party cookie on the visitor’s first touch, then read that cookie at form submission time even if the visit happened days ago.

    This is better than session storage. Cookies persist across sessions (you control how long — 30, 60, 90 days is common). If the visitor returns from a different source, you can decide whether to overwrite (last-touch model) or keep the original value (first-touch model).

    Most UTM tracking plugins for WordPress use this approach. The catch: even with cookies capturing UTMs correctly on your site, you still face the phone-call gap and the disconnection from actual revenue.

    The Step Most WordPress Sites Skip: Connecting UTMs to the Sale

    Let us say your UTM tracking is working. A visitor clicks a Google ad, fills out your contact form, and the lead lands in your CRM with the correct UTM values. Now what?

    If your sales cycle is longer than a day — most service businesses, most B2B — a significant amount of time passes between that lead submission and a closed deal. During that time, a salesperson works the lead, sends proposals, maybe has three calls. Eventually the deal closes, or it does not.

    Your Google Ads account records a conversion when the form was filled. It does not know whether the deal closed. When you look at campaign performance, you see cost-per-lead, not cost-per-customer. If 40% of your leads from one campaign close and 10% from another do, you are optimizing for the wrong signal.

    Closing this loop requires pushing a conversion signal back to Google or Meta when the deal actually closes — what Google calls an offline conversion import. The UTM you captured at lead submission is what lets you match the closed deal back to the original campaign.

    Phone Calls: The UTM Gap Nobody Talks About

    For any business that gets a meaningful portion of leads by phone, UTM tracking is incomplete by default. A visitor clicks your Google ad, lands on your site, and calls the number they see. There is no form fill, no UTM capture. Google Ads may record a call conversion if you are using call extensions, but the lead never hits your CRM with attribution data.

    The fix is call tracking with dynamic number insertion (DNI). A tracking system swaps the phone number displayed on your site with a unique tracking number based on how the visitor arrived. When they call, the call is matched to the UTM source and the call record is logged with that attribution data. The lead enters your pipeline with a source, just like a form fill.

    This is what a complete WordPress UTM tracking setup looks like: first-party cookies for multi-session form fills, DNI for phone calls, and offline conversion imports when deals close. The result is a report that shows you which campaigns drove revenue, not just which campaigns drove activity.

    What to Look For in a WordPress UTM Tracking Setup

    Before choosing a tool or building a setup, confirm it handles these five things:

    1. First-party cookie storage with a configurable persistence window (30+ days)
    2. UTM passthrough to form submissions — including third-party embeds if you use them
    3. Call tracking with DNI so phone leads carry the same attribution as form leads
    4. CRM logging — UTM values stored on the contact or lead record, not just in analytics
    5. Closed-loop export — a way to push a conversion signal back to Google or Meta when a deal closes, using the GCLID or FBCLID captured at the original click

    Most UTM plugins handle item 1 and sometimes item 2. Items 3 through 5 are where the standard WordPress approach falls short. They require either building a custom integration or using a platform that was designed for the full loop from the start — like Sales Provenance, which was built specifically for service businesses running paid traffic on WordPress who need to connect clicks to closed revenue.

    If you are currently looking at UTM reports and working backwards from sessions to guess which campaigns are producing revenue, the gap is fixable. The technical setup is not complex — it just has to cover all five layers, not just the first two.

  • WordPress UTM Tracking: Why Your Setup Has a Gap (and What to Fill It)

    If you run paid ads on Google or Meta, you are already using UTM parameters. You put them on every ad link, your analytics show you which campaigns drove traffic, and the numbers look good.

    The problem shows up two weeks after a campaign ends, when you look at actual sales and try to figure out which campaign drove them. Your analytics shows sessions and leads. Your CRM shows closed deals. The two lists do not match up.

    This is the UTM tracking gap: the click data and the revenue data live in separate systems, and nothing connects them. WordPress UTM tracking solves the first half of the problem (capturing UTMs from clicks into leads). Closing the full loop — all the way to the sale — requires one more step that most WordPress setups skip.

    How UTM Tracking Works (and Where It Breaks)

    When a visitor clicks your Google Ad, the URL they land on includes UTM parameters like ?utm_source=google&utm_medium=cpc&utm_campaign=spring-campaign. Those parameters tell you where the visitor came from.

    A basic WordPress setup reads those parameters from the URL and stores them in the visitor’s browser session. When the visitor fills out a form, the UTM values get submitted along with their name and email. Your CRM or email platform records the lead source.

    This works — until it does not. Common failure points:

    • The visitor leaves and comes back. Most session-based UTM capture only survives a single browsing session. If someone clicks your ad on Monday and books a call on Thursday, the UTM is gone. First-touch or last-touch attribution is wrong.
    • Cross-device visits. Someone sees your ad on their phone, then books a call on their laptop. The UTM never makes it to the form submission.
    • The form is not your form. If you use Calendly, Typeform, JotForm, or any embedded third-party form, UTMs captured on your site often do not pass through to the submission record.
    • Phone calls. Most UTM tracking only works for form fills. A visitor who clicks your ad and calls you instead of filling a form is invisible in UTM reports — even though the ad drove the lead.

    First-Party Cookie Storage: The Fix for Multi-Session Visits

    The standard fix for losing UTMs across sessions is to write them to a first-party cookie on the visitor’s first touch, then read that cookie at form submission time even if the visit happened days ago.

    This is better than session storage. Cookies persist across sessions (you control how long — 30, 60, 90 days is common). If the visitor returns from a different source, you can decide whether to overwrite (last-touch model) or keep the original value (first-touch model).

    Most UTM tracking plugins for WordPress use this approach. The catch: even with cookies capturing UTMs correctly on your site, you still face the phone-call gap and the disconnection from actual revenue.

    The Step Most WordPress Sites Skip: Connecting UTMs to the Sale

    Let us say your UTM tracking is working. A visitor clicks a Google ad, fills out your contact form, and the lead lands in your CRM with the correct UTM values. Now what?

    If your sales cycle is longer than a day — most service businesses, most B2B — a significant amount of time passes between that lead submission and a closed deal. During that time, a salesperson works the lead, sends proposals, maybe has three calls. Eventually the deal closes, or it does not.

    Your Google Ads account records a conversion when the form was filled. It does not know whether the deal closed. When you look at campaign performance, you see cost-per-lead, not cost-per-customer. If 40% of your leads from one campaign close and 10% from another do, you are optimizing for the wrong signal.

    Closing this loop requires pushing a conversion signal back to Google or Meta when the deal actually closes — what Google calls an offline conversion import. The UTM you captured at lead submission is what lets you match the closed deal back to the original campaign.

    Phone Calls: The UTM Gap Nobody Talks About

    For any business that gets a meaningful portion of leads by phone, UTM tracking is incomplete by default. A visitor clicks your Google ad, lands on your site, and calls the number they see. There is no form fill, no UTM capture. Google Ads may record a call conversion if you are using call extensions, but the lead never hits your CRM with attribution data.

    The fix is call tracking with dynamic number insertion (DNI). A tracking system swaps the phone number displayed on your site with a unique tracking number based on how the visitor arrived. When they call, the call is matched to the UTM source and the call record is logged with that attribution data. The lead enters your pipeline with a source, just like a form fill.

    This is what a complete WordPress UTM tracking setup looks like: first-party cookies for multi-session form fills, DNI for phone calls, and offline conversion imports when deals close. The result is a report that shows you which campaigns drove revenue, not just which campaigns drove activity.

    What to Look For in a WordPress UTM Tracking Setup

    Before choosing a tool or building a setup, confirm it handles these five things:

    1. First-party cookie storage with a configurable persistence window (30+ days)
    2. UTM passthrough to form submissions — including third-party embeds if you use them
    3. Call tracking with DNI so phone leads carry the same attribution as form leads
    4. CRM logging — UTM values stored on the contact or lead record, not just in analytics
    5. Closed-loop export — a way to push a conversion signal back to Google or Meta when a deal closes, using the GCLID or FBCLID captured at the original click

    Most UTM plugins handle item 1 and sometimes item 2. Items 3 through 5 are where the standard WordPress approach falls short. They require either building a custom integration or using a platform that was designed for the full loop from the start — like Sales Provenance, which was built specifically for service businesses running paid traffic on WordPress who need to connect clicks to closed revenue.

    If you are currently looking at UTM reports and working backwards from sessions to guess which campaigns are producing revenue, the gap is fixable. The technical setup is not complex — it just has to cover all five layers, not just the first two.