Is it possible to add the Google Tracking code in Webflow Standard forms for a short success message without a redirect page?

TL;DR
  • Insert custom tracking code in form's success message using inline code.
  • Add Google Analytics script in Project Settings under Before </body> Tag.
  • Enable and verify Google Analytics in Integrations.
  • Use Google Tag Manager for handling complex event tracking.

Adding the Google Tracking code to a Webflow form's success message without using a redirect page is possible but requires some creative approaches.

1. Use Custom Code in the Success Message

  • Access Your Form: Go to the form you want to add the tracking code to in Webflow's Designer.
  • Insert Custom Code: In the form's success message settings, insert your Google Tracking code using inline code variables like window.ga('send', 'event', 'Category', 'Action', 'Label'); where necessary.

2. Add Custom Code Before the Closing Body Tag

  • Go to Project Settings: Navigate to Project Settings > Custom Code.
  • Enter Tracking Code: Add your global Google Analytics script in the Before </body> Tag section. This ensures that the tracking code is loaded and ready when a form is submitted.

3. Use Webflow’s Built-In Integrations

  • Enable Google Analytics: Check that your Google Analytics ID is correctly entered in Webflow’s Integrations section under Project Settings.
  • Verify Events: Use Google Analytics to configure and verify event tracking based on form submissions without a page reload.

4. Use Webflow’s Built-In Integrations

  • Use Google Tag Manager: For more complex needs, use Google Tag Manager to handle the event tracking which can be inserted on the form submission.

Summary

You can integrate the Google Tracking code with a Webflow form's success message without a redirect by customizing the success message with event tracking code and ensuring appropriate analytics scripts are included in the Project Settings.

Rate this answer

Other Webflow Questions