Track Submissions with Google Tag Manager

If you run ads on Facebook, Google Ads, or other marketing platforms, tracking form submissions is essential to measure conversions. In this guide, you’ll learn how to track Convert Forms submissions with Google Tag Manager and identify which traffic sources generate leads.

Before You Start

  • Google Tag Manager is installed on your site
  • Your GTM container is published
  • The Convert Forms form submits successfully

Method 1: Via Success Message Visibility

Use this method when your form does not redirect after submission and displays a success message inline. Convert Forms submits forms via AJAX and updates the page dynamically, so Google Tag Manager must detect when the success response becomes visible in the DOM.

google tag manager visibility trigger

GTM trigger setup

  • Go to Triggers and click New
  • Select Element Visibility as the trigger type
  • Set Selection Method to CSS Selector
  • Set Element Selector to #cf_1.cf-success .cf-response (replace 1 with the ID of your form. This avoids false positives when multiple forms exist on the same page)
  • Enable Observe DOM changes. This is required as Convert Forms submits forms using AJAX and updates the DOM without reloading the page. If this option is disabled, GTM may never detect the success message.

Next, attach the trigger to a tag such as a GA4 Event tag, a Google Ads conversion tag, or any third-party analytics tag. Always remember, triggers only detect events. Tags define what data is sent. Without a tag, no tracking data is recorded.

Method 2: Via Thank You Page (Page View Trigger)

Use this method when your form redirects visitors to a dedicated thank-you page after submission. This approach works well when you want a simple and reliable tracking setup based on page views and prefer to manage conversions using URLs rather than JavaScript events.

google tag manager page view trigger

How it works

After submission, the user is redirected to a thank-you page. GTM fires a tag when that page loads.

GTM trigger setup

  1. Create a new trigger
  2. Select Page View
  3. Set trigger type to Some Page Views
  4. Add condition: Page URL contains /thank-you

Attach this trigger to your GA4 Event tag.

Method 3: Using the Convert Forms JavaScript API

Use this method when you need full control over submission tracking, want to track specific forms, or need to send additional data to Google Tag Manager. This approach is ideal for advanced analytics setups and works without relying on DOM visibility or page redirects.

Using Custom JS inside the form settings

You can place JavaScript directly inside Form → Design → Advanced → Custom JavaScript without touching templates or global scripts.

ConvertForms.Helper.onReady(() => {
    var form = document.querySelector('#cf_1');

    form.addEventListener('success', (event) => {
        window.dataLayer = window.dataLayer || [];
        window.dataLayer.push({
            event: 'convertforms_submission'
        });
    });
});

This code runs only when the specific form loads and pushes a custom event to the GTM dataLayer after a successful submission.

GTM trigger setup

google tag manager custom trigger

  1. Go to Triggers and click New
  2. Select Custom Event
  3. Set Event name to: convertforms_submission

Then attach this trigger to your GA4 Event tag.

Last updated on Jan 8th 2026 12:01