To track the source URL of form submissions in Webflow, including UTM parameters from Facebook or Google ads, you need to capture the UTM data and pass it into hidden form fields.
utm_source
, utm_medium
, utm_campaign
).utm_source
).Add JavaScript to your site that reads the UTM parameters from the page URL and assigns them to the hidden fields.
Go to Page Settings > Before
tag, then add the following inline JavaScript:
```javascript
```
This script checks the page URL for UTM parameters and inserts them into the matching hidden fields by ID.
To track if form submissions come from Facebook or Google ads in Webflow, add hidden UTM fields, populate them with JavaScript from the page URL at load, and review the captured data in the form submissions. This enables you to attribute each lead accurately based on the original ad source.