How to Track Pipedrive Booking Form Conversions in GA4 with GTM (2026 Guide)

Pipedrive form conversion tracking in GA4 with Google Tag Manager using a tested iframe listener and generate_lead.

100% Human Written By MD Niamul
GoHighLevel Automation | Ai Agent Automation | Google Ads | Full‑Stack Web Analytics Conversion Tracking & Server Side Tracking Specialist

Quick Answer

To track Pipedrive form conversions in GA4, you cannot use Google Tag Manager’s normal form trigger, because embedded Pipedrive web forms run inside an iframe from a Pipedrive domain. Instead, set the form’s Submit options to redirect to a thank-you page, then add a small listener in a GTM Custom HTML tag. After a successful submit, the Pipedrive form sends a redirect message to your page. The listener catches it and pushes a pipedrive_form_submit event to the data layer. A Custom Event trigger then fires a GA4 generate_lead event, which you test in GTM Preview and GA4 DebugView and mark as a key event.

Key Takeaways

  • Iframes block normal tracking: GTM on your page cannot see clicks or submits inside the Pipedrive iframe.
  • Pipedrive talks through messages: the embedded form sends postMessage messages to your page for resizing and, after a submit, for the redirect.
  • Use the redirect option: the redirect message is the clear success signal. With the in-form thank-you message, no separate submit message is sent.
  • One event, many uses: the same pipedrive_form_submit event can feed GA4, Google Ads and Meta.
  • No form field data: the messages do not include email or phone, so enhanced conversions need another source.
  • Test twice: confirm the event in GTM Preview, then confirm generate_lead in GA4 DebugView.

Introduction: Leads in Pipedrive, Nothing in GA4

Your sales team is happy. New leads arrive in Pipedrive from the website form every day.

Then you open GA4. No lead events. Google Ads optimises for page views because it has nothing better to learn from. Your reports say the website brings visitors but never leads.

The leads are real. GA4 just never heard about them.

That gap costs money. Without a lead event, you cannot see which channel, campaign or landing page brings customers, and your ad platforms cannot optimise for the result you actually want.

In this guide I will show you exactly how to track Pipedrive web form submissions in GA4 with Google Tag Manager, using a listener I tested against Pipedrive’s current embed code.

Why GTM Form Triggers Fail on Pipedrive Forms

When you embed a Pipedrive web form, Pipedrive’s loader script adds an iframe to your page. An iframe is like a window into another website: the form lives on a Pipedrive domain, not on yours.

Browsers keep those two sites apart for security. Google Tag Manager runs on your page, so it cannot see clicks, field values or submits inside the Pipedrive window. That is why the built-in Form Submission trigger and click triggers stay silent.

What the iframe can do is send messages to your page with postMessage. That is the door we use.

Message from the Pipedrive form When it is sent Useful for tracking?
Init (type 1) When the form loads No, it is not a submission
Resize (type 0) When the form changes height, including errors No, it fires for many reasons
Redirect (type 6) After a successful submit, when the form is set to redirect Yes, this is the success signal
Why Google Tag Manager form triggers cannot see a Pipedrive web form inside an iframe, and how postMessage solves it.

Prerequisites & Setup Checklist

  • Pipedrive: permission to edit the web form in Leads Inbox → Web forms.
  • Website: the form embedded with Pipedrive’s embed code, and a thank-you page on your site.
  • Google Tag Manager: the container installed on every page, with publish rights.
  • GA4: Editor access to the property and your Measurement ID, which starts with G-.
  • Consent: a cookie banner connected to Google Consent Mode if you have visitors from the EEA or UK.

Not sure whether GTM is installed correctly? Run your page through my free GTM container analyzer.

Video Tutorial Walkthrough

Prefer to watch? In this video I walk through the whole setup on a live site: the iframe problem, the listener, the GTM trigger and tags, and the final check in GA4 DebugView.

Step-by-Step Implementation Guide

The setup has eight phases. Do them in order and test after each one.

Phase 1: Set the Pipedrive Form to Redirect After Submit

  1. In Pipedrive, open the Leads Inbox, go to Web forms and open your form.
  2. Go to the form’s Submit options.
  3. Choose to redirect to another page after submission, and enter your thank-you page, for example https://yourdomain.com/thank-you/.
  4. Save the form. The embed code on your site does not need to change.

Why this matters: when the form redirects, Pipedrive sends a redirect message to your page first. That message is our reliable “submitted” signal. With the default in-form thank-you message, the form only resizes, and a resize also happens for errors.

Pipedrive web form Submit options set to redirect to a thank-you page after submission for GA4 tracking.

Phase 2: Check GTM and Preview Mode

  1. Open Google Tag Manager and click Preview.
  2. Enter the URL of the page with the Pipedrive form and connect.
  3. Submit a test lead and look at the left panel. You will see page events, but no form submission event. That confirms the iframe problem.

Phase 3: Add the Pipedrive Listener in a Custom HTML Tag

  1. In GTM, go to Tags → New → Custom HTML.
  2. Paste the code below.
  3. Set the trigger to All Pages, or to a Page View trigger for the pages that contain the form.
  4. Name it cHTML – Pipedrive Form Listener and save.
Pipedrive form listener (GTM Custom HTML)
<script>
// Pipedrive web form listener by MD Niamul (mdniamul.com)
// Fires once when an embedded Pipedrive form is submitted
// and the form is set to redirect after submission.
(function () {
  window.dataLayer = window.dataLayer || [];
  var allowedHosts = /(^|\.)(pipedrive\.com|pipedrive\.net|pipedrivewebforms\.com)$/;
  var REDIRECT_MESSAGE = 6; // Pipedrive sends this type after a successful submit
  var alreadySent = {};

  window.addEventListener('message', function (event) {
    var host = '';
    try { host = new URL(event.origin).hostname; } catch (e) { return; }
    if (!allowedHosts.test(host)) return;

    var data = event.data;
    if (!data || typeof data !== 'object' || !data.payload) return;
    if (data.payload.source !== 'pipedriveWebForms') return;
    if (data.type !== REDIRECT_MESSAGE) return;

    var embedId = data.payload.uuid || 'pipedrive_form';
    if (alreadySent[embedId]) return;
    alreadySent[embedId] = true;

    window.dataLayer.push({
      event: 'pipedrive_form_submit',
      form_platform: 'pipedrive',
      form_embed_id: embedId,
      form_redirect_url: data.payload.url || ''
    });
  });
})();
</script>

How it works, in plain words:

  • It listens to every message your page receives, but only trusts messages from Pipedrive domains.
  • It ignores load and resize messages and acts only on the redirect message, type 6.
  • It sends the event once per form, even if the message arrives twice.
  • It pushes pipedrive_form_submit to the data layer with the form’s embed ID and redirect URL.

Want a listener for a different form tool? My free form tracking listener generator builds one for you.

Google Tag Manager Custom HTML tag with the Pipedrive form listener code firing on All Pages.

Phase 4: Test the Data Layer Event

  1. Click Preview again and reload the form page.
  2. Submit a test lead with a test email.
  3. In Tag Assistant, a new pipedrive_form_submit event should appear just before the thank-you page loads.
  4. Click it and open the Data Layer tab. You should see form_platform, form_embed_id and form_redirect_url.
GTM Preview showing the pipedrive_form_submit event with form_platform and form_embed_id in the data layer.

Phase 5: Create the Custom Event Trigger and Variables

  1. Go to Triggers → New → Custom Event.
  2. Set the event name to pipedrive_form_submit, exactly as in the code, and name it CE – pipedrive_form_submit.
  3. Go to Variables → New → Data Layer Variable and create DLV – form_platform and DLV – form_embed_id with those exact key names.

Phase 6: Set Up the Google Tag with a Measurement ID Variable

  1. Create a Constant variable called CONST – GA4 Measurement ID with your G- ID. One place to change it later.
  2. If you do not have one yet, add a Google Tag with that variable as the Tag ID, firing on Initialization – All Pages.
  3. Check that only one GA4 configuration loads on the page, so page views are not doubled.

Phase 7: Create the GA4 generate_lead Event Tag

  1. Go to Tags → New → Google Analytics: GA4 Event.
  2. Set the Measurement ID to {{CONST – GA4 Measurement ID}} and the event name to generate_lead, one of GA4’s recommended events.
  3. Add event parameters: form_platform = {{DLV – form_platform}} and form_id = {{DLV – form_embed_id}}.
  4. Attach the CE – pipedrive_form_submit trigger and name the tag GA4 – generate_lead – Pipedrive.

Choose one method. If you already count a page view of the thank-you page as a lead, do not also fire this tag, or each lead is counted twice.

GA4 Event tag in Google Tag Manager sending generate_lead with form parameters on the pipedrive_form_submit trigger.

Phase 8: Publish, Verify in DebugView and Mark the Key Event

  1. In Preview, submit one more test lead and confirm GA4 – generate_lead – Pipedrive fired on pipedrive_form_submit.
  2. In GA4, open Admin → Data display → DebugView and find generate_lead with its parameters.
  3. Click Submit in GTM and publish with a clear version name.
  4. Once the event appears in GA4, go to Admin → Events and click the star to mark generate_lead as a key event.
  5. Register form_platform and form_id as custom dimensions if you want them in reports.
GA4 DebugView showing a generate_lead event from a Pipedrive form with form_platform and form_id parameters.

The Full Data Flow at a Glance

# What happens Where
1 The visitor fills in and submits the embedded form Pipedrive iframe
2 Pipedrive saves the lead and sends a redirect message (type 6) Pipedrive → your page
3 The listener pushes pipedrive_form_submit GTM Custom HTML
4 The Custom Event trigger fires GTM
5 The GA4 tag sends generate_lead GA4
6 The visitor lands on your thank-you page Your website
7 The key event appears in reports and can be imported to Google Ads GA4 and Google Ads
Data flow from a Pipedrive form submit through the GTM listener and trigger to the GA4 generate_lead key event.

Testing & Validation Workflow

  1. Load test. Load the form page without submitting. No pipedrive_form_submit should appear.
  2. Error test. Submit with a required field empty. No event should appear.
  3. Success test. Submit a valid test lead. One event appears, then the thank-you page loads.
  4. Tag test. The GA4 event tag fires once on that event.
  5. DebugView. generate_lead arrives with form_platform set to pipedrive.
  6. Pipedrive check. The test lead appears in the Leads Inbox.
  7. Weekly check. For the first weeks, compare GA4 lead counts with new leads in Pipedrive from the website.

Troubleshooting Common Mistakes

Mistake 1: No event appears after submit

The Problem: the lead arrives in Pipedrive, but Preview shows nothing.

The Cause: the form still uses the in-form thank-you message, so no redirect message is sent.

The Solution: switch the Submit options to redirect to a thank-you page, as in Phase 1.

Mistake 2: The event fires on page load

The Problem: leads are counted when nobody submitted.

The Cause: an older listener reacts to every Pipedrive message, including resize.

The Solution: use the listener above, which only reacts to the redirect message.

Mistake 3: Leads are counted twice

The Problem: GA4 shows twice as many leads as Pipedrive.

The Cause: both the listener event and a thank-you page view are counted as leads.

The Solution: keep one method and remove the other.

Mistake 4: The event shows in Preview but not in GA4

The Problem: GTM fires the tag, but DebugView is empty.

The Cause: the wrong Measurement ID, a denied consent state, or an unpublished container.

The Solution: check the Constant variable, the consent state in Preview, and publish the container.

Mistake 5: Google Ads enhanced conversions have no data

The Problem: you expected email or phone with each lead.

The Cause: Pipedrive’s messages do not include form field values.

The Solution: use offline conversion uploads from Pipedrive with the stored click ID instead.

What to Set Up Next

Want this done for you? See my Pipedrive form conversion tracking service.

Conclusion

Pipedrive forms are not hard to track once you stop fighting the iframe and listen to the message it already sends.

Your next three moves are clear. First, set the form to redirect after submission. Second, add the listener and a Custom Event trigger in GTM. Third, send generate_lead to GA4, test it in DebugView and mark it as a key event.

Every lead in Pipedrive should be a lead in GA4.

Summary by MD Niamul

Embedded Pipedrive web forms load inside an iframe from a Pipedrive domain, so Google Tag Manager’s form and click triggers cannot see submissions. The form does send postMessage messages to the parent page: init and resize messages on load and layout changes, and a redirect message with type 6 after a successful submit when the form’s Submit options are set to redirect. A GTM Custom HTML listener that trusts only Pipedrive origins and reacts only to that redirect message can push a pipedrive_form_submit event to the data layer. A Custom Event trigger then fires a GA4 generate_lead event tag with form parameters, using a Constant variable for the Measurement ID. Test in GTM Preview and GA4 DebugView, publish, and mark generate_lead as a key event.

Frequently Asked Questions (FAQ)

1. Why doesn’t the GTM form trigger work on Pipedrive forms?

Embedded Pipedrive web forms load inside an iframe from a Pipedrive domain, not from your website. Browsers keep the two sites separate for security, so Google Tag Manager on your page cannot see clicks, field values or submits inside the form. The Form Submission and click triggers therefore never fire. You need a listener that reads the messages the Pipedrive iframe sends to your page.

2. How does the Pipedrive form tell my page it was submitted?

The form communicates with your page through postMessage. When it loads it sends an init message, it sends resize messages when its height changes, and after a successful submit it sends a redirect message when the form is set to redirect to another page. That redirect message, with type 6, is the reliable success signal the listener uses.

3. Do I have to use the redirect option?

For this listener, yes. When the form shows its built-in thank-you message instead of redirecting, Pipedrive only resizes the form after a submit. A resize also happens for validation errors and other layout changes, so it cannot tell a real submission apart. Setting Submit options to redirect to your own thank-you page gives you a clear success signal and a page you control.

4. Can I just track the thank-you page instead?

Yes, that works too. Create a page view trigger for the thank-you page URL and fire the GA4 generate_lead tag on it. The downside is that anyone who reloads or bookmarks the page is counted again. The listener only fires right after a real submit. Choose one method, not both, or every lead is counted twice.

5. Can I get the email or phone from a Pipedrive form?

Not from the browser. Pipedrive’s messages to your page do not include form field values. That means you cannot pass email or phone to GA4, Google Ads enhanced conversions or Meta advanced matching from this listener. For lead quality and offline results, store the click ID with the lead in Pipedrive and upload conversions from the CRM instead.

6. Which GA4 event name should I use?

Use generate_lead. It is one of GA4’s recommended event names for lead generation, so it works well with GA4 reports and Google Ads imports. Add parameters such as form_platform and form_id so you can tell Pipedrive leads apart from other forms. After the first event arrives, mark generate_lead as a key event in Admin, Events.

7. Will this work if I have several Pipedrive forms on one page?

Yes. The listener stores the embed ID of each form and sends one event per form, so two different forms can each send their own lead. If you need to tell forms apart in reports, add a form name to the redirect URL, for example a query parameter, and pass the form_redirect_url value as an extra GA4 parameter.

8. How do I send Pipedrive leads to Google Ads?

The simplest way is to import the GA4 generate_lead key event into Google Ads as a conversion. For more control, add a Google Ads Conversion Tracking tag in GTM on the same pipedrive_form_submit trigger, with a Conversion Linker on all pages. For closed deals, upload offline conversions from Pipedrive using the stored GCLID.

9. What if Pipedrive changes its form code?

The listener relies on the message Pipedrive’s web form sends today, which I checked against Pipedrive’s current embed scripts in October 2026. If Pipedrive changes that message, the event could stop. Keep a weekly check comparing GA4 leads with new website leads in Pipedrive, and retest in GTM Preview after any big change to your forms or website.

10. Do I need consent for this tracking?

If you have visitors from the EEA or UK, GA4 tags should follow the visitor’s consent choice. Use a cookie banner connected to Google Consent Mode so GA4 only stores cookies when the visitor agrees. The listener itself only reads a message on your page, but the GA4 event it triggers is analytics tracking and should respect consent. This is general information, not legal advice.

🚀 Need Help Advanced GHL Automation & Tracking Setup?

💬 Want this implemented without mistakes?

I’ve helped 850+ advertiser agencies & D2C brands unlock $11.6M+ revenue by implementing 1,500+ Ai Driven GoHighLevel full Business Automation+ client-side & server-side tracking systems.

⮏ My core services include:

⨭ GoHighLevel Automation — build CRM pipelines, WhatsApp automation, AI voice workflows & automated follow-ups end-to-end.
⨭ AI Agent Automation — deploy AI chatbots & agents for 24/7 lead qualification and support.
⨭ Paid Ads Management — Google Ads, Meta Ads.
⨭ Full Stack SEO/GEO/AEO Manager.
⨭ CRO-Focused Web Development — Landing Pages on WordPress, Shopify, Wix, Squarespace.
⨭ Google Tag Manager (GTM) — manage data layers & (Marketing platform Tag, Trigger & Variables).
⨭ Custom Code by GTM — HTML, CSS & JavaScript for the help of marketing platform advanced tracking.
⨭ Server-Side Tracking — Bypassing ITP/Ad-blockers for 99% accuracy (Stape Partner)
⨭ Google Analytics 4 (GA4) — visualize customer journeys.
⨭ Multi-Channel CAPI — Facebook, TikTok, Pinterest & Snapchat Conversion API & Klaviyo email marketing tools.
⨭ Third Party Checkout Conversion Tracking — Shopify, Stripe, GoQuick, ShipRocket, PayPal or more.
⨭ Google Consent Mode (GCM) — maintain GDPR compliance.
⨭ Marketing Automation — streamline workflows (Zapier/n8n/Make).
⨭ CRM Conversion Tracking — link offline sales to ads.
⨭ Tag Management — GTM & Third-Party Checkout Tracking.
⨭ Offline & CRM Tracking — HubSpot, Salesforce, Zoho, Pipedrive, Odoo, Webhook & Sheet.
⨭ Advanced Analytics — GA4, Google Looker Studio & Big Query (SQL) for deep data visualization.

If you want your GoHighLevel Business Automation & server side tracking done right the first time, message me.

Leave a Reply

Your email address will not be published. Required fields are marked *

Conversion tracking specialist dashboard showing Google Ads and GA4 data analysis with GTM integration.

MD NIAMUL

GoHighLevel Automation | Ai Agent Automation | Server Side Tracking Specialist

Niamul

If You Need GTM Listener Code Submit Your Email