Pardot and WordPress: The Lead Source Gap
Pardot (now called Salesforce Marketing Cloud Account Engagement) is a B2B marketing automation platform built for longer sales cycles, complex lead nurturing, and tight integration with Salesforce CRM. Organizations using Pardot typically have a real demand for knowing where their leads came from — B2B marketing budgets are significant, sales cycles are long, and connecting marketing activity to closed revenue is the fundamental attribution question the whole team needs answered.
The challenge: Pardot’s native forms and WordPress sites don’t share source data automatically. A prospect who clicks a LinkedIn ad, reads a blog post, and fills out a contact form on your WordPress site generates a Pardot lead with their name, email, and company — but often no information about which campaign introduced them to you.
This guide covers how to capture UTM data from your marketing campaigns and pass it through to Pardot prospect records, so every lead in your pipeline carries the source data your sales team and marketing team actually need.
Why Source Data Matters in a Pardot-Salesforce Pipeline
In most Pardot implementations, leads become Salesforce opportunities when they’re sales-qualified. If source data travels with the prospect from lead to opportunity, your team can:
- Measure marketing-sourced revenue. Filter closed-won opportunities by lead source and calculate actual revenue attributed to each channel, not just lead volume
- Optimize campaign spend at the portfolio level. If LinkedIn campaigns generate expensive leads that close at a high rate, and Google Search generates cheaper leads that rarely close, your budget allocation decision is clear — but only if the data is there
- Build source-aware nurture tracks. Pardot’s engagement programs support conditional branching. A prospect who found you through a branded search is further along in their awareness than one who clicked a cold display ad; their nurture sequence should reflect that
- Report marketing contribution to leadership. The marketing-sourced pipeline number is a standard executive metric in B2B organizations. Without lead source data, this number is either absent or inaccurate
How UTM Tracking Works in a WordPress-Pardot Setup
The basic flow:
- A prospect arrives on your WordPress site from a tagged URL with UTM parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term)
- A JavaScript snippet reads those parameters and stores them in a first-party cookie that persists as the prospect navigates the site
- When the prospect submits a form, hidden fields capture the stored UTM values
- The form data — including the UTM fields — posts to Pardot, either through a Pardot form embedded on the page or via a WordPress form plugin integrated with Pardot through the Pardot API or Zapier
- Pardot stores the UTM values on the prospect record as custom fields
- When the prospect converts to a Salesforce lead or contact, the Pardot custom field values can sync to Salesforce custom fields on the lead/contact and opportunity records
Step 1: Consistent UTM Tagging Across Campaigns
Source data tracking starts with UTM tags on every marketing link. A tagged URL looks like:
https://yoursite.com/resources/guide/?utm_source=linkedin&utm_medium=paid_social&utm_campaign=q3-enterprise-awareness&utm_content=cfo-targeting
Every paid ad, email campaign link, partner referral, and event link should carry UTMs. Use consistent naming conventions — “linkedin” not “LinkedIn” not “LI” — because any variation creates a separate bucket in your data that you’ll have to reconcile later. Organic search traffic doesn’t need manual UTM tagging, but every paid and owned channel does.
Use Google’s Campaign URL Builder to construct tagged URLs without typos. For large campaign sets, build a spreadsheet that generates tagged URLs from a consistent naming convention so you’re not manually typing UTMs for every ad.
Step 2: Capture UTMs in Cookies on Landing
UTM parameters exist in the URL only on the first pageview. A landing-page cookie script captures them immediately and persists the data across the session and across pages:
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';
}
});
if (!readCookie('landing_page')) {
document.cookie = 'landing_page=' + encodeURIComponent(window.location.href)
+ '; path=/; max-age=7776000; SameSite=Lax';
}
});
function readCookie(name) {
const m = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
return m ? decodeURIComponent(m[2]) : '';
}
Install this on your WordPress site via WPCode, your theme, or a custom header script. It runs on every page and writes UTM values to 90-day cookies that survive navigation between pages.
Step 3: Create Custom Fields in Pardot
Pardot stores additional data on prospect records as custom fields. In your Pardot account, go to Admin > Configure Fields > Prospect Fields and create text fields for:
- Lead Source (maps to utm_source)
- Lead Medium (maps to utm_medium)
- Lead Campaign (maps to utm_campaign)
- Lead Content (maps to utm_content)
- Lead Keyword (maps to utm_term)
- Landing Page (maps to the first URL the prospect visited)
If your Pardot-Salesforce sync is configured, also create matching custom fields on the Salesforce Lead and Contact objects (and optionally on the Opportunity, via a formula field or workflow) so the source data carries through when prospects become sales-qualified.
Step 4: Pass UTMs Through Forms to Pardot
The connection method depends on how your forms are set up:
Option A: Pardot forms embedded on WordPress. Pardot’s native forms can be embedded on WordPress pages via the Pardot plugin or via iframe. In the Pardot form editor, add hidden fields for each UTM custom field. Use JavaScript to populate those hidden fields from cookies when the page loads:
document.addEventListener('DOMContentLoaded', function() {
const fieldMap = {
'lead_source': 'utm_source',
'lead_medium': 'utm_medium',
'lead_campaign': 'utm_campaign',
'lead_content': 'utm_content',
'lead_keyword': 'utm_term',
'landing_page': 'landing_page'
};
Object.entries(fieldMap).forEach(function([fieldName, cookieName]) {
const val = readCookie(cookieName);
if (val) {
// Target by Pardot field name attribute
const input = document.querySelector('[name="' + fieldName + '"]');
if (input) input.value = val;
}
});
});
Note: Pardot iframe forms run in a separate browsing context. You cannot inject JavaScript into an iframe from the parent page. The cookie-reading JavaScript needs to be added inside the Pardot form’s own layout template (via Pardot’s form editor under Layouts), or you need to use Option B or C below.
Option B: WordPress form plugins with Pardot integration. Gravity Forms has a Pardot add-on. WPForms and similar plugins can connect to Pardot via Zapier or the Pardot API. Add hidden fields to your WordPress form for each UTM value, populate them from cookies using JavaScript in the parent page (no iframe boundary issue), and map the fields to Pardot custom fields in the integration settings.
Option C: Zapier with a Pardot integration. Route WordPress form submissions to Pardot via Zapier. Configure the Zap to create or update a Pardot prospect with UTM field values mapped to the custom fields you created. This works with any WordPress form plugin that can trigger a Zap.
Step 5: Verify End to End
Before the setup goes live, test the complete pipeline:
- Open an incognito window and visit:
yoursite.com/?utm_source=test&utm_medium=email&utm_campaign=tracking-verify - Navigate to another page (verify UTM cookies persist in DevTools > Application > Cookies)
- Submit your form with a test email address
- Find the prospect record in Pardot — check that Lead Source shows “test”, Lead Medium shows “email”, Lead Campaign shows “tracking-verify”
- If Pardot-Salesforce sync is active, verify the lead/contact record in Salesforce shows the same values
Pardot-Specific Considerations
Pardot’s built-in Source field. Pardot has a default “Source” field on prospect records. This field is populated by Pardot’s own tracking mechanism (based on referrer and campaign association), not by UTM parameters directly. It’s useful but limited — it captures channel-level data (organic search, direct, paid search) but not campaign-specific data. The custom UTM fields you create above layer on top of this and provide the campaign-level granularity you need.
Prospect deduplication. Pardot deduplicates prospects on email address. If the same email submits twice (once with UTMs and once without), Pardot updates the existing record. Depending on your field update rules, the existing UTM data may or may not be overwritten. Configure your custom UTM fields with “Do not update unless blank” if you want to preserve first-touch source data across multiple form submissions from the same prospect.
Salesforce field sync order. When Pardot syncs to Salesforce, the direction and update rules for each field matter. Confirm that your UTM custom fields are configured to sync from Pardot to Salesforce (not the other way around, which would overwrite Pardot data with empty Salesforce fields).
Using Source Data in Pardot
Once source data arrives with each prospect:
Segmentation lists. Create Pardot dynamic lists filtered by Lead Source or Lead Campaign. A list of “LinkedIn-sourced prospects” or “Q3 awareness campaign prospects” can receive targeted content without mixing them into a general nurture track.
Engagement program branching. Add source-based conditions to your engagement programs. A branch that checks “if Lead Medium = paid_social, send sequence A; else send sequence B” lets you tailor follow-up to where someone came from.
Salesforce reports by source. In Salesforce, build reports that filter opportunities by the Lead Source field (synced from Pardot). Calculate pipeline value and closed-won revenue by source to show marketing’s contribution to the business in revenue terms.
The Manual Maintenance Problem
This setup works, but it requires ongoing maintenance. Every new form added to your WordPress site needs the hidden UTM fields and JavaScript wiring. If you add a campaign landing page, you need to set up the form integration again. When Pardot form layouts change, the JavaScript may need updates.
A dedicated WordPress attribution plugin installs once and handles the UTM capture-and-pass pipeline automatically across all forms — Pardot, and any other platform connected to your site. When a new form goes live, source data flows through without a separate configuration step.
If reliable lead source data from WordPress through Pardot to Salesforce is something your team needs working consistently, Sales Provenance is the faster path.
