Webflow sync, pageviews & more.
NEW
Answers

How can I include UTM parameter data in my Webflow form submission to track sources like social media and Google?

To include UTM parameter data in your Webflow form submission, you can make use of hidden fields and JavaScript. Here's a step-by-step guide to help you achieve this:

1. Update Form Action URL: Go to your form settings in the Webflow Designer and check the "Customize Form" option. In the code editor, locate the `

` opening tag and add `?utm_source={{utm_source}}&utm_medium={{utm_medium}}&utm_campaign={{utm_campaign}}&utm_term={{utm_term}}&utm_content={{utm_content}}` after the action URL. This will dynamically add UTM parameters to the form submission URL.

2. Create Hidden Fields: Add the following hidden fields to your form in the code editor:

```html





```

3. Set Hidden Field Values: Use JavaScript to populate the hidden fields with the values from the URL parameters. Add the following JavaScript code before the closing `` tag or in an external JavaScript file:

```javascript

```

4. Publish and Test: Once you've made these changes, publish your site to see the hidden fields in action. You can then test by visiting your site with UTM parameters in the URL. When submitting the form, the UTM parameter values will be captured and included in the form submission data.

By implementing these steps, you'll be able to track source information like social media and Google through UTM parameters in your Webflow form submissions.

Rate this answer

Other Webflow Questions