How do I add Google Ads Conversion Tracking code to the submit buttons on the API page and Contact Page Submission buttons in Webflow?

TL;DR
  • Add the Global Site Tag in Webflow's Project Settings under the head section.  
  • Insert the conversion event snippet using custom code or embed elements that trigger only after successful form submissions on the API and Contact pages.

To track conversions via Google Ads when users submit forms on your API and Contact pages in Webflow, you need to add the Google Ads Conversion Tracking tag and trigger the conversion when the form is submitted.

1. Set Up Google Ads Conversion Tracking

  • In your Google Ads account, go to Tools & Settings > Conversions.
  • Click + New Conversion Action, then choose Website.
  • Set the goal type as Lead or Submit lead form (depending on your setup).
  • Fill in the required fields, then click Create and Continue.
  • Choose “Install the tag yourself” and copy:
  • Global site tag (gtag.js)
  • Event snippet code (for conversion trigger)

2. Add the Global Site Tag to Your Webflow Project

  • Go to Project Settings > Custom Code.
  • Paste the Global site tag inside the head section.
  • Click Save Changes and Publish your site.

3. Add Event Snippet via Webflow Form Settings

  • Open Designer, go to your API Page and select the form’s Form Block.
  • Go to the Element Settings panel (D gear icon).
  • Scroll down to Form Submission section and add the conversion trigger to the Form's Success message or use a custom script (see next step for custom).

4. Trigger Google Ads Event on Form Submission

To ensure the conversion triggers only after successful submission:

  • Select the Form Block in Designer.
  • Go to Page Settings > Custom Code or embed using an HTML embed element near the form.
  • Add a small inline script that listens for a successful submission, like this (without script tags):

    gtag('event', 'conversion', {'send_to': 'AW-XXXXXXX/xyzabcd123'});

  • Replace 'AW-XXXXXXX/xyzabcd123' with your actual Google Ads conversion ID and label from the event snippet.

You can embed this in two places:

  • In the Page Settings > Footer Custom Code with a conditional check for form submission.
  • Inside a Webflow Embed element placed just below the form's Success Message block.

5. Repeat for Contact Page

  • Go to your Contact page, repeat steps 3 and 4 for the contact form.
  • If using a different endpoint or form, make sure each has its own identifiable script or use the same conversion ID if they count as the same goal.

Summary

To add Google Ads conversion tracking for form submissions:

  • Add the Global Site Tag in Project Settings.
  • Insert the conversion trigger (event snippet) using custom code or embed elements that fire on successful form submission.
  • Apply these steps on both the API and Contact pages.

Make sure to publish your site and test form submissions to verify that conversions appear in your Google Ads dashboard.

Rate this answer

Other Webflow Questions