Track Go High Level Forms with Google Tag Manager Using GHL From Listener

11 Feb, 2026

If you’re running Go High Level forms and want to track conversions in Google Analytics or Facebook Ads, here’s how to do it with Google Tag Manager.

What This Does

This event listener catches when someone submits a GHL form or completes a booking, then pushes that info to your dataLayer so you can track it as a conversion.

The Event Listener Code

<script>
(function(){
var formData={};
window.addEventListener('message',function(event){
if(Object.prototype.toString.call(event.data)==='[object Array]'){
var formJSON=event.data[2];
if(formJSON&&typeof formJSON==='string'){
try{
var formObject=JSON.parse(formJSON);
if(formObject.email||formObject.name||formObject.phone){
formData=formObject;
window.dataLayer=window.dataLayer||[];
window.dataLayer.push({event:'ghl_form_submission',formData:formObject,formOrigin:event.origin});
}
}catch(e){}
}
var eventType=event.data[0];
if(eventType==='booking-complete'||eventType==='form-complete'){
window.dataLayer=window.dataLayer||[];
window.dataLayer.push({event:'ghl_calender_submit',bookingData:formData,eventOrigin:event.origin});
}
}
},false);
})();
</script>
JavaScript

Alternative GHL Event Listener Code

<script>
(function() {
  var inputData = {};
  window.addEventListener('message', function (event) {
    if(Object.prototype.toString.call(event.data) === '[object Array]') {
        var inputJSON = event.data[2];

        if(inputJSON && inputJSON.includes('full_address') && inputJSON.includes('customer_id') && inputJSON.includes('full_name') && inputJSON.includes('email')) {
            var inputObject = JSON.parse(inputJSON);
            inputData = inputObject
            dataLayer.push({
                event: 'ghl_form_submit',
                inputs: inputObject
            });
        }

        if(event.data[0] === 'msgsndr-booking-complete') {
            dataLayer.push({
                event: 'ghl_booking_complete',
                inputs: inputData
            });
        }
    }
  });
})();
</script>
JavaScript

This tracks two events: ghl_form_submit when a form is submitted, and ghl_booking_complete when a booking happens.

Video Tutorial Coming Soon

How to Set It Up

1. Add the Listener to GTM

In Google Tag Manager, create a new Custom HTML tag, paste the code above, and set it to trigger on All Pages (or just pages with your GHL forms). Save it.

2. Create Event Triggers

Go to Triggers and create two custom event triggers:

  • One for ghl_form_submit
  • One for ghl_booking_complete

3. Fire Your Conversion Tags

Now use these triggers on whatever tags you want to fire – Google Analytics events, Facebook Pixel, Google Ads conversions, whatever you’re using.

For example, if you’re tracking with GA4, create a GA4 Event tag, set the event name to something like “form_submission”, and use the ghl_form_submit trigger.

Grab Form Data (Optional)

The listener captures form fields like name, email, and address. To use this data, create Data Layer Variables in GTM:

  • Variable name: inputs.full_name for the customer’s name
  • Variable name: inputs.email for their email
  • Variable name: inputs.customer_id for the customer ID

You can then pass these to your marketing tags if needed.

Quick Tips

Testing: Use GTM’s Preview Mode before publishing. Submit a test form and make sure the events show up in the dataLayer and your tags fire.

Privacy: Make sure you’re only tracking people who’ve given consent. Add consent checks to your triggers if you need to.

Troubleshooting: If events aren’t firing, check your browser console for errors and verify the listener tag fired on page load.

That’s it. Once you publish your GTM container, you’ll start tracking GHL form submissions as conversions.

Related Posts

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

0 Comments

Submit a Comment

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

Shibbir Ahmed

Hi, I’m here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey.
Book Meeting

Search Tags

Claim FREE Audit