The Problem With Klaviyo Lead Tracking in WordPress
You’re running ads, publishing content, sending emails, and posting on social. Leads are coming through your WordPress contact forms and landing on your Klaviyo email list. But when you look at your Klaviyo profiles, you have no idea where those people actually came from.
Was it Google? Facebook? Organic search? A referral? Klaviyo captures the email address. It doesn’t automatically capture what drove that person to your site in the first place.
This guide shows you how to fix that — so every Klaviyo subscriber has a lead source attached to their profile from the moment they opt in.
Why Lead Source Data Matters in Klaviyo
Klaviyo is primarily known for email and SMS marketing, but it also holds rich subscriber profile data. When you know where each subscriber came from, you can:
- Segment by source — send different welcome flows to Google Ads leads vs. organic search leads
- Measure channel ROI — connect Klaviyo revenue (for ecommerce) or conversions back to the original source
- Optimize your ad spend — know which campaigns are building a high-quality list vs. a low-quality one
- Score leads intelligently — organic subscribers tend to convert differently than paid subscribers
Without source data, all of that segmentation is guesswork.
How Klaviyo Lead Source Tracking Works
The approach is straightforward:
- UTM parameters arrive on your WordPress site from the traffic source (Google Ads, Facebook, etc.)
- A tracking script captures those UTMs and stores them in the visitor’s browser session
- When a visitor submits a form, the UTMs are passed as hidden fields alongside their contact info
- Your form plugin sends the form data (including UTMs) to Klaviyo as custom profile properties
- Klaviyo stores the source data on the subscriber profile permanently
The result: every Klaviyo profile shows exactly which campaign, channel, and keyword drove that subscriber to opt in.
What You Need
- WordPress site with contact forms or opt-in forms
- Klaviyo account (any plan)
- UTM tracking setup on your ad campaigns and links
- A way to capture UTMs and pass them to Klaviyo — either a dedicated attribution plugin or custom code
Step 1: Make Sure Your Campaigns Use UTM Parameters
Before anything else, your traffic sources need to be tagged. UTM parameters are the query string values that tell your tracking system where a visitor came from.
A properly tagged URL looks like this:
https://yoursite.com/free-guide/?utm_source=facebook&utm_medium=paid-social&utm_campaign=fall-promo&utm_content=carousel-ad
Tag every ad, every email campaign, and every link you control. Organic search doesn’t need tags — Google Search Console handles that separately.
Step 2: Capture UTMs on Landing
When a visitor lands on your site, their UTM parameters live in the URL for that first pageview. The moment they click to another page, those parameters disappear from the URL.
You need a script that reads the UTM parameters on landing and stores them — typically in a first-party cookie or localStorage — so they’re available when the visitor finally fills out a form (which may happen several pages and several minutes later).
Most attribution plugins handle this automatically. If you’re building this yourself, you’ll read window.location.search on page load, parse the UTM values, and write them to cookies with a 30-day or 90-day expiry.
Step 3: Pass UTMs Through Your Opt-In Form as Hidden Fields
Your Klaviyo forms or embedded opt-in forms need hidden fields that populate with the stored UTM values when the form loads.
If you’re using Klaviyo’s own embedded forms, this requires custom JavaScript that populates hidden input fields before the form submits. If you’re using a WordPress form plugin (WPForms, Gravity Forms, Formidable) that integrates with Klaviyo via Zapier or a direct integration, you add hidden fields to the form and populate them with JavaScript on page load.
The hidden fields you want to capture:
lead_source— maps to utm_source (e.g., “google”, “facebook”)lead_medium— maps to utm_medium (e.g., “cpc”, “email”, “organic”)lead_campaign— maps to utm_campaignlead_content— maps to utm_content (ad creative or link)lead_keyword— maps to utm_term (paid keyword, if applicable)landing_page— the first URL the visitor landed on
Step 4: Map Form Fields to Klaviyo Profile Properties
When the form submits to Klaviyo (via their API or an integration), those hidden field values need to land as custom profile properties on the subscriber.
In Klaviyo, custom properties can be named anything. You’ll configure your form integration so that:
- The form’s
lead_sourcefield maps to a Klaviyo property calledLead Source - The form’s
lead_campaignfield maps toLead Campaign - And so on for each UTM field
Once this is set up, every new subscriber who submits that form will have those properties written to their profile automatically.
Step 5: Verify It’s Working
Test the full flow before you trust the data:
- Click a tagged link (e.g., one with
utm_source=test&utm_medium=test) - Navigate a few pages to make sure the UTMs persist
- Submit an opt-in form with a test email address
- Find that profile in Klaviyo and check the profile properties — you should see Lead Source, Lead Campaign, etc. populated correctly
If the properties aren’t there, the most common culprits are: the hidden fields aren’t being populated by JavaScript, the integration isn’t mapping the fields correctly, or the UTMs aren’t being stored in cookies properly.
Using Lead Source Data in Klaviyo Flows and Segments
Once the data is flowing, you can put it to work immediately:
Segment by lead source: Create a segment for “Lead Source equals google” and another for “Lead Source equals facebook.” Now you can see list growth by channel and compare engagement rates.
Trigger different welcome flows: A subscriber who came from a paid Google Ad is in a different mindset than someone who found you through an organic blog post. Personalize your welcome sequence accordingly.
Filter reports by source: When you run a campaign and want to know how paid subscribers performed vs. organic, you can filter by the Lead Source property.
Lead scoring: Some businesses score leads differently based on source. An organic subscriber who found you by searching for your exact service often converts at a higher rate than a cold paid subscriber.
The Easier Way: Use an Attribution Plugin That Does This Automatically
Setting up UTM capture, cookie storage, hidden field population, and Klaviyo field mapping manually takes time and ongoing maintenance. Every form you add to your site needs to be updated. The cookie logic has to be tested across browsers.
A dedicated WordPress attribution plugin handles all of this in a single setup. You install it, connect it to Klaviyo, and it automatically passes lead source data to every form on your site — no per-form JavaScript, no manual mapping.
Sales Provenance is built for exactly this use case: WordPress sites that send leads to Klaviyo (or any CRM) and need to know which channel drove each one. It captures UTMs on landing, persists them through the session, and populates them into your Klaviyo profiles automatically — including the first landing page and the referring URL, not just the UTMs.
If you want your Klaviyo list to have clean, complete lead source data without the manual setup, Sales Provenance is the fastest way to get there.