Webflow sync, pageviews & more.
NEW

How can I track the source URL of form submissions in Webflow to determine whether users are coming from Facebook ads or Google ads, after adding UTM parameters to the ads?

TL;DR
  • Add hidden fields to your Webflow form for each UTM parameter you want to capture (e.g., utm_source, utm_medium).
  • Use JavaScript to populate these fields from the page URL on load.
  • Submit the form data with embedded UTM values, viewable in Webflow submissions or sent via tools like Zapier.
  • Optionally, preserve UTM parameters across pages using sessionStorage or URL rewriting.

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.

1. Add Hidden Fields to Your Webflow Form

  • In the Webflow Designer, add one hidden input for each UTM parameter you want to track (e.g., utm_source, utm_medium, utm_campaign).
  • To do this:
  • Drag a Form Block into your page.
  • Click into the Form and add a "Hidden" field for each UTM.
  • Set each field’s Name and ID to match the parameter you want to capture (e.g., utm_source).
  • Do not set them to Required.

2. Use Custom Code to Populate Hidden Fields

  • 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.

3. Use Webflow Forms or Zapier/Make to Forward Submission Data

  • When a user submits the form, Webflow will include these hidden values in the submission data.
  • You can view the UTM data in:
  • Webflow Form Submissions Dashboard, or
  • Form notification emails, or
  • Zapier/Make automations if you forward leads to external CRMs.

4. Preserve UTM Parameters Across Pages (Optional)

  • If your ads send users to a landing page and then redirect to a second page with the form:
  • Use sessionStorage or URL rewriting to carry UTM parameters across pages.
  • Alternatively, use a tool like Google Tag Manager to capture and forward UTM data.

Summary

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.

Rate this answer

Other Webflow Questions