ClickFunnels and WordPress: How to Track Lead Source Through to Your Funnel

ClickFunnels and WordPress: When Your Funnel Doesn’t Know Where Its Leads Came From

ClickFunnels is a funnel-building platform used by course creators, coaches, consultants, and ecommerce businesses. Many ClickFunnels users also run a WordPress site — for their blog, their main brand presence, their SEO content, or their general web identity. ClickFunnels handles the funnel pages, opt-ins, and checkout; WordPress handles the rest.

The attribution problem: someone reads your WordPress blog post, clicks to your ClickFunnels opt-in page, signs up, and goes into your funnel. The traffic source that brought them to your WordPress blog in the first place — whether that was a Google search, a Facebook ad, a podcast mention, or an email campaign — typically disappears before they ever reach the ClickFunnels page.

You know the lead exists. You don’t know what caused them to seek you out. This guide covers how to bridge that gap by capturing UTM source data on WordPress and carrying it through to ClickFunnels contacts.

Two Different Attribution Scenarios

There are two common ways that WordPress and ClickFunnels connect, and the tracking setup differs for each.

Scenario A: Traffic lands on WordPress first, then goes to ClickFunnels. A visitor finds your WordPress blog post through organic search or a paid ad, reads it, and clicks a call-to-action that links to a ClickFunnels opt-in page or landing page. The UTM parameters (or referrer data) from the original traffic source exist on the WordPress side of the journey but need to be carried through the click to the ClickFunnels page.

Scenario B: Traffic lands directly on a ClickFunnels page. Your paid ads, email campaigns, or social posts link directly to a ClickFunnels funnel page, bypassing WordPress entirely. In this case, UTM parameters are in the URL of the ClickFunnels page itself, and the tracking setup is entirely within ClickFunnels.

This guide focuses primarily on Scenario A (the WordPress-first journey) because that’s where the tracking gap is hardest to close.

The WordPress-First Journey: How to Pass UTMs Through the Click

When a visitor arrives on WordPress via a tagged URL and then clicks through to ClickFunnels, the standard approach is to pass the UTM parameters through as URL parameters on the ClickFunnels link. Here’s the flow:

  1. Visitor arrives on WordPress with UTMs: yourblog.com/post/?utm_source=google&utm_medium=cpc&utm_campaign=summer-offer
  2. A WordPress script captures those UTMs and stores them in a first-party cookie
  3. When the page renders your ClickFunnels link (a button or CTA), a script appends the stored UTM values to the link URL: yourfunnel.com/opt-in?utm_source=google&utm_medium=cpc&utm_campaign=summer-offer
  4. The visitor arrives on your ClickFunnels page with the UTMs in the URL
  5. ClickFunnels captures the URL parameters and maps them to contact fields

This approach avoids the cross-domain cookie problem (cookies from WordPress don’t transfer to ClickFunnels, which is on a different domain). Instead, the data travels in the URL itself.

Step 1: Capture UTMs on WordPress

Add a JavaScript snippet that reads UTM parameters from the URL on landing and stores them in cookies:

document.addEventListener('DOMContentLoaded', function() {
  const params = new URLSearchParams(window.location.search);
  const utmParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
  
  utmParams.forEach(function(param) {
    const val = params.get(param);
    if (val) {
      document.cookie = param + '=' + encodeURIComponent(val)
        + '; path=/; max-age=7776000; SameSite=Lax';
    }
  });
});

function readCookie(name) {
  const m = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
  return m ? decodeURIComponent(m[2]) : '';
}

Install via WPCode or your theme. This runs on every WordPress page and stores any UTM values present in the URL in 90-day cookies.

Step 2: Append UTMs to Your ClickFunnels Links

Add a script that modifies any links pointing to your ClickFunnels domain by appending the stored UTM cookie values as URL parameters:

document.addEventListener('DOMContentLoaded', function() {
  const utmParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
  
  // Replace with your ClickFunnels domain(s)
  const cfDomains = ['yourfunnel.com', 'go.yourbrand.com'];
  
  document.querySelectorAll('a[href]').forEach(function(link) {
    const href = link.href;
    const isCfLink = cfDomains.some(d => href.includes(d));
    if (!isCfLink) return;
    
    const url = new URL(href);
    utmParams.forEach(function(param) {
      const val = readCookie(param);
      if (val && !url.searchParams.has(param)) {
        url.searchParams.set(param, val);
      }
    });
    link.href = url.toString();
  });
});

Replace the cfDomains array with the actual domains your ClickFunnels pages are on. This script scans every link on the page and appends UTM parameters to any that point to your ClickFunnels domain.

Step 3: Capture UTMs in ClickFunnels

ClickFunnels can capture URL parameters and store them in contact fields. In your ClickFunnels form settings:

  1. Add hidden fields to your opt-in or order form for each UTM parameter you want to capture
  2. Set each hidden field’s “Default Value” to pull from the URL parameter with the same name: in ClickFunnels 2.0, use the input’s external ID or a URL parameter binding to map utm_source to a hidden field, and so on for each parameter
  3. When a contact submits the form, the UTM values from the URL populate the hidden fields and are stored on the ClickFunnels contact record

In ClickFunnels 2.0, you can also use custom contact attributes (under Contacts > Attributes) to store the source data persistently on the contact record rather than on a single form submission.

Step 4: Test the Pipeline

  1. Open an incognito window and visit your WordPress site with UTMs: yourblog.com/post/?utm_source=test&utm_medium=organic&utm_campaign=tracking-check
  2. Click the CTA link that goes to your ClickFunnels page — verify the URL now contains the UTM parameters (check the address bar)
  3. Submit the opt-in form with a test email address
  4. Check the contact in ClickFunnels — the source fields should reflect the test UTM values

For Scenario B: Traffic Landing Directly on ClickFunnels

If your ads and campaigns link directly to ClickFunnels pages (bypassing WordPress), you don’t need the WordPress-to-ClickFunnels UTM pass-through. Instead:

  • Tag all your ad and campaign links with UTM parameters going to the ClickFunnels URL directly
  • Capture those UTM parameters in ClickFunnels using the same hidden field approach described in Step 3
  • ClickFunnels reads the UTMs from its own URL and stores them on the contact record

This is simpler because there’s no cross-domain handoff to engineer.

What to Do With Source Data in ClickFunnels

Once source data is on ClickFunnels contact records:

Segment contacts by source. In ClickFunnels 2.0, filter contacts by attribute values. This shows you which channels are building your list and which are producing buyers rather than just subscribers.

Tag contacts for source-specific follow-up. Apply tags based on UTM values (a “google-paid” tag for utm_medium = cpc, a “facebook” tag for utm_source = facebook). Use those tags to enroll contacts in different email sequences in your connected email platform.

Revenue attribution. If you track purchases in ClickFunnels, filter purchasers by source attribute to calculate revenue by channel. Which campaign produced paying customers? This is the fundamental attribution question that changes budget decisions.

The Ongoing Maintenance Problem

The URL-appending approach works but has limits. Every new page on your WordPress site with a ClickFunnels CTA needs the link-appending script to be working. If someone shares a blog post link without UTMs (common in organic social), the visitor arrives without source data and there’s nothing to pass through. The script approach also doesn’t handle cases where a visitor bookmarks a WordPress page and returns later from a different device.

A dedicated WordPress attribution plugin handles UTM capture automatically across your site and passes source data to connected platforms — including ClickFunnels via integration — without per-page configuration. If getting reliable source data from WordPress into ClickFunnels contact records is something you want working consistently, Sales Provenance is the faster path.