Skip to main content

Tracking Web Forms with Google Analytics & Ads

Practices on tracking Web Forms with Google Analytics and Ads

Why Track Your Web Forms?

Understanding how your Web Forms perform is crucial for measuring your marketing success. By connecting your forms to Google Analytics and Google Ads, you can see which campaigns drive the most leads, calculate your cost per acquisition, and make data-driven decisions about where to invest your marketing budget.

What You'll Need

Before you begin, make sure you have:

  • Your Web Form already embedded on your website

  • Google Analytics or Google Ads already installed on your site

  • Basic familiarity with where to add code to your website (or access to someone who does)

Good news: You don't need to be a developer to set this up! If you can copy and paste, you can track your forms.

How Web Form Tracking Works

When someone successfully submits your Web Form, it automatically triggers an event called iksFormSubmit. You can "listen" for this event and then tell Google Analytics or Google Ads that a conversion happened.

Think of it like a doorbell: when someone rings it (submits the form), you hear it (your tracking code detects the event) and can respond (send the data to Google).


Method 1: Add Tracking Code to Your Website (Most Common)

This method works for all form types and gives you the most flexibility.

Step 1: Locate Your Tracking Code

First, you'll need to know what type of Google tracking you're using. Check your website's code or ask your web developer which applies to you:

Google Analytics 4 (GA4) - Look for code containing gtag('config', 'G-XXXXXXXXXX')

Google Ads - Look for code containing gtag('config', 'AW-XXXXXXXXXX')

Google Tag Manager - Look for code containing GTM-XXXXXXX

Step 2: Add the Tracking Script

Add one of the following code snippets to your website. This code should be placed anywhere on the page where your form appears—it doesn't need to be next to your form embed code.

For Google Analytics 4

<script> document.addEventListener('iksFormSubmit', (event) => {     
const response = event.detail;

// Send form submission event to Google Analytics
gtag('event', 'form_submission', { '
form_id': response.form_id, '
event_category': 'Web Form',
'event_label': 'Lead Submission'
});
});
</script>

What this does: Every time someone submits your form, Google Analytics will record a "form_submission" event. You'll be able to see these events in your GA4 reports under Events.

For Google Ads Conversions

<script> 
document.addEventListener('iksFormSubmit', (event) => {
const response = event.detail;

// Send conversion to Google Ads
gtag('event', 'conversion', {
'send_to': 'AW-XXXXXXXXXX/YYYYYYYYYY'
});
});
</script>

Important: Replace AW-XXXXXXXXXX/YYYYYYYYYY with your actual Google Ads conversion ID and label. You can find this in your Google Ads account under Tools > Conversions.

What this does: Tells Google Ads that a conversion happened, allowing you to track ROI from your ad campaigns.

For Google Tag Manager

<script> document.addEventListener('iksFormSubmit', (event) => {     
const response = event.detail;

// Push form submission to dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ '
event': 'formSubmission',
'formId': response.form_id,
'formType': 'iksWebForm'
});
});
</script>

What this does: Sends the form submission data to Google Tag Manager's dataLayer, where you can set up tags and triggers to handle it however you want.

Next step for GTM users: In your Google Tag Manager account, create a new trigger for the custom event "formSubmission" and connect it to your Google Analytics or Ads tags.

Step 3: Test Your Tracking

After adding the code:

  1. Submit a test entry through your form

  2. Check Google Analytics (Events report) or Google Ads (Conversions) within 24-48 hours

  3. For immediate verification, use Google Tag Assistant (a free Chrome extension) to see if events are firing


Method 2: Add Tracking to Landing Page Forms (Easiest)

If your form is configured as a Landing Page type, you can add tracking code directly within the form builder—no website code editing required!

Step 1: Open Your Form Settings

  1. Log into your account

  2. Navigate to your Web Form

  3. Locate the Extra Conditions section in the form builder

Step 2: Add Your Tracking Code

Paste the appropriate tracking code from Method 1 directly into the Extra Conditions section. Use the same Google Analytics, Google Ads, or Google Tag Manager examples shown above.

Step 3: Save and Publish

Save your form changes. The tracking code will now travel with your form automatically—no additional website updates needed!

Benefits of this method:

  • No need to edit your website code

  • Tracking code stays with the form if you move it

  • Easy to update without involving your web team

  • Perfect for non-technical users

Tracking Multiple Forms

If you have multiple forms on your website and want to track them separately, you can identify which form was submitted using the formId from the event:

<script> 
document.addEventListener('iksFormSubmit', (event) => {
const response = event.detail;
const formId = response.form_id;

// Track different forms separately
if (formId === '123456789') {
gtag('event', 'contact_form_submission');
} else if (formId === '987654321') {
gtag('event', 'demo_request_submission');
}
});
</script>

This allows you to see in Google Analytics which specific forms are performing best.


Common Questions

Do I need to add this code to every page?

Only add the tracking code to pages where your forms appear. If you have forms on multiple pages, you can either:

  • Add the code to each page individually

  • Add it once to your site's global footer (if your web platform supports this)

  • Use Method 2 for Landing Page forms

Will this slow down my form?

No. The tracking code runs after the form is submitted, so it doesn't affect form loading speed or submission performance.

Can I track both Google Analytics and Google Ads?

Yes! You can include multiple tracking calls in the same event listener:

<script> 
document.addEventListener('iksFormSubmit', (event) => {
const response = event.detail;

// Track in Google Analytics
gtag('event', 'form_submission', {
'form_id': response.form_id
});

// Track in Google Ads
gtag('event', 'conversion', {
'send_to': 'AW-XXXXXXXXXX/YYYYYYYYYY'
});
});
</script>

What if I'm not seeing data in Google?

Check these common issues:

  • Wait 24-48 hours—Google tracking isn't always instant

  • Verify your Google tracking code (gtag or GTM) is installed on your site

  • Use Google Tag Assistant to confirm events are firing

  • Make sure you replaced placeholder IDs (like AW-XXXXXXXXXX) with your actual IDs

  • Check that you submitted a test form after adding the tracking code

Can I track other platforms like Facebook Pixel?

Absolutely! The same iksFormSubmit event works with any tracking platform. For example:

<script> 
document.addEventListener('iksFormSubmit', (event) => {
// Facebook Pixel
fbq('track', 'Lead');

// LinkedIn Insight Tag
lintrk('track', { conversion_id: XXXXXX });
});
</script>

Advanced: Passing UTM Parameters

If you're using UTM parameters in your URLs (like ?utm_source=google&utm_campaign=spring2026), you can capture and send these to Google Analytics:

<script> 
document.addEventListener('iksFormSubmit', (event) => {
const response = event.detail;
const urlParams = new URLSearchParams(window.location.search);

gtag('event', 'form_submission', {
'form_id': response.form_id,
'campaign_source': urlParams.get('utm_source'),
'campaign_name': urlParams.get('utm_campaign')
});
});
</script>

This helps you see exactly which marketing campaigns are driving form submissions.


Getting Help

Still have questions about setting up form tracking?

  1. Check your Google documentation: Google provides detailed guides for Analytics 4 and Ads conversion tracking

  2. Use browser extensions: Google Tag Assistant (Chrome) helps verify your tracking is working

  3. Contact our support team: We're here to help with form-specific questions

  4. Consult your web developer: For complex tracking scenarios or if you're unsure where to add code

Remember: Once set up, this tracking runs automatically—you'll never have to think about it again!

Running paid ads on Google or Meta? Learn about Enhanced Conversion Tracking to improve your ad attribution and ROAS measurement.

Did this answer your question?