Webflow sync, pageviews & more.
NEW
Answers

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

Yes, it is possible to add the Google Analytics tracking code in Webflow Standard forms, even without a redirect page. Here's how you can achieve this:

1. Go to your Webflow project and open the Project Settings by clicking on the gear icon in the left sidebar.

2. In the Project Settings, navigate to the Custom Code tab.

3. In the Head Code section, paste your Google Analytics tracking code. Ensure that you have the correct tracking code generated from your Google Analytics account.

4. Click on the Save Changes button to apply the changes to your project.

5. Next, you'll need to add a small custom code snippet to fire off a Google Analytics event when the form submission is successful. This custom code will utilize the built-in Webflow form success event.

6. Select the page where your form is located in the Designer and click on the Settings (gear) icon in the top-right corner of the screen.

7. In the Page Settings, go to the Custom Code tab.

8. In the Footer Code section, you'll need to add a small JavaScript code snippet. Here's an example of how the code should look:

```html

```

Make sure to replace `'form_submission'`, `'Form'`, and `'Contact Form'` with relevant values that match your tracking needs.

9. Click on the Save changes button to apply the changes to your page.

With these steps, the Google Analytics tracking code will be added to your Webflow site, and an event will be fired off whenever the form is successfully submitted. This will allow you to track form submissions as interactions in Google Analytics without redirecting the user to a separate success page.

Remember to republish your site for the changes to take effect. You can test the form submission and check your Google Analytics account to verify that the events are being properly tracked.

Rate this answer

Other Webflow Questions