Yes, Webflow provides an integrated and straightforward way to set up Google Analytics for your production site at a custom domain. Here's how you can do it:
1. Connect your Google Analytics account: In your Webflow project, go to Project Settings and select the Integrations tab. Click on the Connect button next to the Google Analytics integration. Follow the instructions to connect your Google Analytics account to your Webflow project.
2. Configure your tracking settings: After connecting your Google Analytics account, you can configure the tracking settings to track analytics for your production site at a custom domain. In the Google Analytics section, select your custom domain from the dropdown menu under "Site tracking."
3. Set up goals for form submissions: To track successful form submissions as events in Google Analytics, you need to set up goals. In your Google Analytics account, go to the Admin section, and under the View column, click on Goals. Click on the "+ New Goal" button and select the Custom option. Give your goal a name and choose the Event type. Specify the conditions that define a successful form submission, such as the event category, action, or label, depending on how you've set up your tracking in Webflow.
4. Implement the event tracking code: In your Webflow project, add the event tracking code to your form submission success page. You can do this by accessing the page's settings and adding the code in the Custom Code section. The code should be written in JavaScript and following the syntax for firing an event in Google Analytics. Make sure to replace the placeholders with the appropriate values for your event category, action, and label.
For example:
```
```
By implementing this code, the event will be triggered when a user completes a successful form submission, and Google Analytics will track it accordingly.
5. Publish your site: Once you've completed the above steps, publish your site to make the changes live on your custom domain. From that point forward, Google Analytics will start tracking analytics for your production site, and events will be recorded when users complete successful form submissions.
Remember to allow some time for data to populate in your Google Analytics account after setting everything up.
By following these steps, you can easily integrate Google Analytics into your Webflow site and track analytics for your production site at a custom domain, while also firing events whenever a user completes a successful form submission.