<head> section via Project Settings. To track form submissions on your Webflow site from Google Ads, you need to ensure the Google Ads conversion tracking code fires only after a successful form submission. Adding the code merely “Inside <head> tag” is not sufficient.
<head> tag" section.
Since Webflow AJAX-handles form submissions, you need to target the form's submit success event using Webflow interactions or custom JavaScript.
Use this process:
adwords-form).
<script>
document.addEventListener("DOMContentLoaded", function () {
var form = document.getElementById("adwords-form");
if (form) {
form.addEventListener("submit", function (e) {
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.target.classList.contains("w-form-done")) {
gtag('event', 'conversion', {
'send_to': 'AW-XXXXXXXXX/YYYYYYYYYY' // Replace with your actual conversion ID and label
});
observer.disconnect();
}
});
});
observer.observe(form.parentNode, {
attributes: true,
attributeFilter: ['class'],
subtree: true
});
});
}
});
</script>
'AW-XXXXXXXXX/YYYYYYYYYY' with your Google Ads Conversion ID and Conversion Label, which are shown in your Google Ads dashboard when you create a conversion action.
To track Google Ads conversions on your Webflow form, put the Global Site Tag in the <head> section, and the event snippet in custom code that triggers when the Webflow form successfully submits. Use a combination of form ID and MutationObserver to detect the success state and trigger the gtag conversion event.