← Back to blog

How to capture UTM parameters in Pipedrive

To capture UTM parameters in Pipedrive, create a custom text field for each value you want (utm_source, utm_medium, utm_campaign, utm_term, gclid), add a hidden field for each one to the form on your website, and map each hidden field to its custom field in whatever sends submissions to Pipedrive. Pipedrive’s built-in Source fields record how a lead was added, not which campaign or keyword sent it. If the values are not in the form submission, they never reach Pipedrive.

The rest of this post covers each part, the mistakes that make the fields arrive empty, and how to report on the result.

What Pipedrive’s own source fields capture

Pipedrive added four lead source fields to leads and deals:

FieldWhat it holdsCan you edit it?
Source originHow the record was added: Manually created, Import, API, Web forms, Chatbot, Live chat, Campaigns and a few othersNo. Pipedrive sets it
Source origin IDAn ID for that origin, such as the ID of the Pipedrive formOnly through the API
Source channelThe sales or marketing tool that added the record, picked from a list your admin definesYes
Source channel IDA custom value for the item within that toolYes

These are useful for one question: did this lead come from a web form, the chatbot, an import or a person typing it in? They do not hold utm_source, utm_medium, utm_campaign, the keyword or a click ID. A lead from your Google Ads brand campaign and a lead from a LinkedIn post can both arrive with the same Source origin of “Web forms”. To tell them apart you need your own fields.

The custom fields to create

Create these in Settings > Company settings > Data fields. Use the Text type for all of them.

Field nameTypeWhat goes in it
UTM SourceTextutm_source, for example google, facebook, newsletter
UTM MediumTextutm_medium, for example cpc, email, social
UTM CampaignTextutm_campaign, the campaign name from your ad account
UTM TermTextutm_term, usually the paid search keyword
UTM ContentTextutm_content, the ad or link variation
GCLIDTextgclid, the Google Ads click ID, for offline conversion imports
Landing PageTextThe page the visitor first arrived on
ReferrerTextThe site that sent them, for visits with no UTMs

Three decisions to make before you click save.

Person, or lead and deal? In Pipedrive, leads use the same fields as deals, so a field you create on deals also appears on leads. Person fields are separate. If your form integration creates a person and you report on people, put the fields on the person. If you report on deals and your integration creates leads or deals, put them on the deal. A person field does not copy itself onto a deal.

Text, not single option. A single option field only accepts values you have already added as options. Campaign names change every month, so a new campaign has nowhere to go. Text accepts anything.

Note the API key. Pipedrive gives every custom field an API key, which is what Zapier, Make and the API use. Find it under Data fields, click the ”…” next to the field, and choose Copy API key.

How values get from the URL into Pipedrive

A UTM link looks like this:

https://yoursite.com/pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-search&utm_term=crm+software&gclid=EAIaIQ

The values sit in the address bar. Pipedrive only sees what the form sends. So something has to copy the values from the URL into the form, and something has to carry the form’s values into the right Pipedrive fields. How that works depends on the form. If UTM parameters are new to you, what are UTM parameters covers how to build the links.

(a) Pipedrive Web Forms

Web Forms are part of the LeadBooster add-on and send submissions into Pipedrive as leads or deals. For a long time they had no hidden fields, which made UTM capture impossible without another form builder.

Pipedrive’s August 2026 product update changed that. It lists automatic UTM parameter capture into hidden form fields, capture of cookie values and JavaScript variables, and recording of the referral URL and landing page. At the time of writing the Web Forms help article does not yet describe how to set these up, so check the form editor in your account and test it with a tagged link before relying on it.

One thing to test in particular: whether the form still has the UTMs when the visitor lands on one page and fills in the form on another. More on that under common mistakes.

(b) Your own website forms, sent to Pipedrive by an integration

This is the most common setup. The form lives on your site (WPForms, Gravity Forms, Jotform, Webflow, plain HTML) and an integration or Zapier sends each submission to Pipedrive.

First, add a hidden input for each value. In plain HTML:

<input type="hidden" name="utm_source">
<input type="hidden" name="utm_medium">
<input type="hidden" name="utm_campaign">
<input type="hidden" name="utm_term">
<input type="hidden" name="utm_content">
<input type="hidden" name="gclid">

Form builders have an equivalent. Gravity Forms and WPForms have a Hidden field type. Contact Form 7 uses a [hidden fieldname] tag. Jotform has a Hidden Field element.

Second, fill them. A short script on the form page reads the query string and writes it in:

<script>
  var params = new URLSearchParams(location.search);
  ['utm_source','utm_medium','utm_campaign','utm_term','utm_content','gclid']
    .forEach(function (key) {
      var input = document.querySelector('input[name="' + key + '"]');
      if (input && params.get(key)) input.value = params.get(key);
    });
</script>

This only works if the visitor submits on the page they landed on. To survive a click to another page, save the values to a cookie or sessionStorage on arrival and read them back at the form.

Third, map them. Open the connection that sends submissions to Pipedrive and match each hidden field to its custom field:

  • Native add-ons (the Gravity Forms or WPForms Pipedrive add-ons, for example) have a field mapping screen. Each custom field appears in the list once it exists in Pipedrive.
  • Zapier: the Pipedrive Create Person action supports custom fields. Drop the form’s utm_campaign value into the UTM Campaign field on that step. If a new field is missing, refresh the fields list.
  • Make: the Pipedrive app docs say to map custom fields by field code rather than label, so renaming a field later does not break the scenario. They also say empty strings are rejected for custom fields, so only send a field when it has a value.
  • The Pipedrive API or a webhook: use the field’s API key, not its label.

(c) LeadBooster Chatbot and Live Chat

Pipedrive sets Source origin to Chatbot or Live chat for leads created that way, so you can see the lead came through chat. I could not find any Pipedrive documentation on passing UTM values into chatbot or live chat leads. Until that exists, treat chat leads as having a known origin and an unknown campaign, and keep them separate in your reports rather than lumping them in with Direct.

First touch or last touch

A buyer might click a LinkedIn ad, leave, come back a week later from a Google search for your name, and then fill in the form. Which source goes in the field?

The script above records the last touch: whatever was in the URL on the visit when they converted. That over-credits branded search, because people search your name after something else made them aware of you. First touch records the visit that introduced them.

For anything with a consideration period, store both. Create a First Touch and a Last Touch version of the source, medium and campaign fields. First touch vs last touch goes through when each answers the question you are asking.

Common mistakes

UTMs lost after the landing page. The visitor lands on /pricing?utm_campaign=brand-search, clicks to /contact, and the query string is gone. A script that only reads the current URL submits blank fields. Store the values on arrival.

Safari’s 7-day cookie limit. Safari caps cookies set by JavaScript at seven days. Outside the EU, every browser on iOS uses the same engine. If you store first touch in a JavaScript cookie and the buyer converts on day nine, first touch is gone. A cookie set by your server avoids this. See Safari cookie limitations.

Redirects that drop the query string. A redirect from http:// to https://, from the bare domain to www., or from an old URL to a new one can forward the visitor without the ?utm_ part. Paste a tagged link into a browser and check the address bar after it loads. If the parameters are missing, fix the redirect before anything else.

Visits with no UTMs at all. Organic search, referrals and untagged social posts arrive with an empty query string. If you only read UTMs, these leads look identical to Direct. Capture document.referrer as well.

A field that exists on both ends but is not mapped. The custom field is in Pipedrive, the hidden input is on the form, and the integration in the middle has never been told to connect them. The result looks exactly like a tracking failure.

Testing on an existing person. Some integrations skip custom fields when they update a person who already exists. Test with an email address Pipedrive has never seen.

Forms inside an iframe. A script on your page cannot write into a form loaded in an iframe from another domain. Use the form vendor’s JavaScript embed if it has one.

How to report on lead source in Pipedrive

List view, any plan. Add UTM Source and UTM Campaign as columns on your Person, Lead or Deal list, then filter on them. That answers “which campaign produced these deals?” in a minute.

Insights reports. Deal reports can be filtered by fields on the linked contact person, so person-level UTM fields can still filter a deal report. Pipedrive’s docs say custom fields in report filters and the visual builder need Premium or higher. Custom fields can be added as table columns on all plans.

Grouping. The lead conversion report groups by lead source by default and can be viewed by Source origin or Source channel. “View by” on custom fields covers option, date, person, organization and user fields, not text. So filter by your text UTM fields, and use Source origin when you want a quick split by web form versus chat versus import.

The report worth building is won deals by campaign, not new leads by campaign. The campaign with the cheapest cost per lead is often not the one with the cheapest cost per won deal. If you captured gclid, export won deals with it and upload them to Google Ads as offline conversions, so bidding learns from revenue rather than form fills.

FAQ

Does Pipedrive track UTM parameters automatically? Its Source fields do not. They record how a record was added (web form, chatbot, import, API), not the campaign. Pipedrive’s August 2026 update added UTM capture to Web Forms hidden fields. For forms on your own site, you need hidden fields and a mapping.

Which Pipedrive field type should I use for UTMs? Text. A single option field rejects any value that is not already in its option list, and campaign names change constantly.

Should UTM fields go on the person or the deal? Whichever you report on, and whichever your integration creates. Leads share deal fields, so a deal field covers both leads and deals.

Can I see the Google Ads keyword in Pipedrive? Yes, if your ads pass it in utm_term (for example utm_term={keyword} in your Google Ads tracking template) and you capture utm_term into a custom field.

Why are my UTM fields empty in Pipedrive? In order of likelihood: the visitor moved to another page before submitting, the hidden field is not mapped in the integration, a redirect dropped the query string, or the test used an existing person.

Doing it without the script

If you would rather not maintain the storage, referrer and Safari handling yourself, SourceTag does that part: it stores first and last touch, categorises untagged visits by referrer and fills hidden fields on forms on your site. The Pipedrive integration page shows the field mapping and what a lead looks like afterwards, and the Pipedrive setup guide has the steps.