Pipedrive and WordPress: How to Track Lead Source Through to Your CRM

Written by

in

Pipedrive is one of the most widely used CRMs for small and mid-sized businesses, and it pairs naturally with WordPress — Pipedrive handles the pipeline, WordPress handles the website where leads come from. The problem most Pipedrive + WordPress setups run into is the same one that affects every CRM pairing: leads arrive in Pipedrive with no source data. You can see that you have a new contact, but not where they came from, which campaign drove the visit, or which keyword they searched before they filled out the form.

This guide covers how to wire Pipedrive and WordPress together so that every contact in your pipeline carries the full attribution trail from the session that produced the lead.

What Pipedrive Does and Does Not Track by Default

Pipedrive does not have native website tracking the way HubSpot does. When a form submits from your WordPress site into Pipedrive — whether via Pipedrive’s web forms, a WordPress form plugin with a Pipedrive integration, a webhook, or Zapier — the contact record contains whatever fields you sent it. If you did not send source data, the contact has no source data.

Pipedrive does have a “Source” field on contacts and deals (visible under the contact’s details as a dropdown), and it has a basic marketing source tracking feature for Pipedrive-hosted web forms. Neither of these gives you the granular campaign-level UTM data you need to answer which specific campaign, channel, or keyword produced the lead. That requires custom fields and a UTM capture layer on your WordPress site.

Setting Up UTM Capture in WordPress

The foundation of reliable Pipedrive attribution is capturing UTM parameters from the visitor’s landing URL and carrying them through to the form submission. The process is the same regardless of which CRM you use:

  1. When a visitor lands on your site with UTM parameters in the URL, capture them to first-party cookies. A small JavaScript snippet reads utm_source, utm_medium, utm_campaign, utm_term, and utm_content from the URL if they are present, and writes them to cookies with a 30-day expiration. The cookies persist across page navigation — so a visitor who lands on a blog post, browses to your services page, and submits a contact form there still carries the UTMs from their original landing URL.
  2. Add hidden form fields that read the cookie values at submission time. For each UTM parameter, add a hidden input field to your contact form. A JavaScript snippet reads the cookies and populates the hidden fields when the form loads. When the visitor submits, the UTM values travel alongside their name, email, and message.
  3. Also capture the gclid (Google click identifier) and fbclid (Facebook click identifier) using the same cookie approach. These identifiers are required for offline conversion upload to Google Ads and Meta, respectively — they connect the closed deal in Pipedrive back to the specific ad click that started the journey.

Custom Fields to Create in Pipedrive

Before connecting your forms, create custom fields in Pipedrive to hold the attribution data. In Pipedrive, go to Settings > Data Fields and add these as custom fields on the Person or Lead object (and mirror them on the Deal object):

  • Lead Source Campaign (text) — maps from utm_campaign
  • Lead Source Medium (text) — maps from utm_medium
  • Lead Source Term (text) — maps from utm_term (keyword for paid search)
  • Lead Source Content (text) — maps from utm_content (ad variation identifier)
  • Landing Page (text) — the first page the visitor landed on, captured from a cookie set on first pageview
  • gclid (text) — Google click identifier, for Google Ads offline conversion upload
  • fbclid (text) — Facebook click identifier, for Meta offline conversion upload

Use the same field names on both Person and Deal objects so that when a deal is created from a person, you can easily copy the attribution data across. Pipedrive does not auto-copy custom person fields to deals, but a workflow automation (Pipedrive Automations) can handle this.

Connecting WordPress Forms to Pipedrive

There are three main approaches for routing WordPress form submissions into Pipedrive with attribution data:

Option 1: Pipedrive’s Native Web Forms

Pipedrive offers hosted web forms that submit directly into your pipeline. You can embed these forms on your WordPress site via iframe or JavaScript embed. The advantage is zero integration work — submissions land in Pipedrive natively. The limitation is that Pipedrive’s web forms do not automatically read UTM cookies from your WordPress site, so you need a small script that detects the form’s hidden fields (or uses Pipedrive’s URL parameter feature) and populates them from the cookies before submission.

Option 2: WordPress Form Plugin + Webhook to Pipedrive API

Most WordPress form plugins (Gravity Forms, WPForms, Fluent Forms, Contact Form 7 with add-ons) support sending a webhook on form submission. Point the webhook at Pipedrive’s Persons API endpoint (POST https://api.pipedrive.com/v1/persons) and map your form fields — including the hidden UTM fields — to Pipedrive person fields in the webhook payload. This keeps the form on your site (full design control, no iframe) and routes submissions directly into Pipedrive without Zapier.

The webhook payload maps field names to Pipedrive field keys. For custom fields, use the numeric field key from Pipedrive’s API (visible under Settings > Data Fields > each field’s API key):

{
  "name": "{{name}}",
  "email": [{"value": "{{email}}", "primary": true}],
  "phone": [{"value": "{{phone}}", "primary": true}],
  "abc1234": "{{utm_source}}",
  "def5678": "{{utm_campaign}}",
  "ghi9012": "{{gclid}}"
}

Option 3: Zapier or Make (Integromat)

If your form plugin does not support direct webhooks, use Zapier or Make to bridge the form submission to Pipedrive. The tradeoff is added latency (Zapier introduces a delay, which matters if your team has a fast follow-up process) and a dependency on a third-party service staying connected. Make sure the hidden UTM fields are included in the data your form plugin sends to Zapier, then map them to the custom Pipedrive fields in the Zap.

Pipedrive Automations: Copy Attribution to Deals

Once attribution data is on the Person record, you need it on the Deal record to run deal-level reporting. Create a Pipedrive Automation that triggers when a new Deal is created and copies the person’s custom attribution fields to the deal. The automation uses Pipedrive’s field update action:

  1. Trigger: Deal created
  2. Action: Update deal — set Lead Source Campaign from linked person’s Lead Source Campaign field (and repeat for each attribution field)

This runs automatically every time a deal is created from a person who has attribution data, and it means your deal pipeline reports can filter and group by source without manual data entry.

Reporting: Which Channels Produce Deals

With attribution on deals, you can run the most important report in your marketing stack: which channel produces the most closed deals (not just the most leads).

In Pipedrive, go to Reports > Deals and group by your Lead Source Medium custom field. Filter to closed/won deals only. This shows you the breakdown of closed revenue by channel — organic search, paid search (cpc), email, direct, social. Compare this to your lead volume by source to see which channels convert leads to deals at the highest rate, which is often very different from which channels produce the most leads.

For more granular analysis, use the Lead Source Campaign field to see performance by specific campaign, and the Lead Source Term field to see which keywords are actually closing — not just generating clicks.

Closing the Loop With Google Ads Offline Conversions

If your WordPress forms capture gclid into a Pipedrive custom field, you have what you need to tell Google Ads which clicks produced real deals — not just form fills. When a deal closes in Pipedrive, export the gclid, the deal close date, and the deal value, and upload this to Google Ads as an offline conversion event.

Two ways to do this:

  • Pipedrive Automations + Google Ads API: A Pipedrive workflow automation can fire a webhook when a deal reaches Won status. That webhook posts the gclid and conversion data to the Google Ads offline conversions API. This is fully automated once set up — no manual CSV exports.
  • Manual CSV upload: Export won deals from Pipedrive filtered by a date range, include the gclid column, format as the Google Ads offline conversion import template, and upload via Google Ads > Goals > Conversions > Offline conversion imports. This works without any additional integration and is a good starting point before investing in the automated path.

The result: Google Ads learns which keywords and ad variations produce customers, not just form fills, and its smart bidding optimizes toward the traffic that actually converts to revenue.

What the Full Stack Looks Like

When everything is connected:

  • Visitor clicks a Google Ad for “CRM for small business” and arrives on your site with utm_source=google, utm_medium=cpc, utm_campaign=crm-smb, and a gclid
  • The UTM capture script stores all parameters in cookies
  • The visitor browses, then submits a contact form three pages later
  • Hidden fields read the cookies and submit UTMs + gclid alongside the form data
  • The form webhook creates a Pipedrive person with Lead Source Medium=cpc, Lead Source Campaign=crm-smb, gclid=[value]
  • A Pipedrive Automation creates a deal and copies all attribution fields to it
  • When the deal closes 30 days later, the gclid uploads to Google Ads as an offline conversion
  • Google Ads bidding improves toward keywords that produce revenue

Building this end-to-end takes a few hours of setup. The payoff is that every marketing decision is grounded in deal data rather than form-fill counts.

For a WordPress attribution layer that handles UTM capture, hidden fields, CRM routing, and Google Ads offline conversion upload as a unified system — rather than assembling each piece separately — Sales Provenance integrates everything described here. Related reading: UTM parameter tracking on WordPress, CRM integration for WordPress, HubSpot and WordPress lead tracking, and Google Ads conversion tracking for WordPress.