How to make sure your web forms are tracked with Google Analytics
Note: We no longer provide support for cross domain tracking with Google Analytics. We highly recommend using a service like Bizable in order to track analytics for your form.
If you are already using Google Analytics to measure your website traffic and the effectiveness of your marketing, you probably want to make sure that your FormAssembly forms are also included in your tracking.
FormAssembly offers several ways to publish a web form. The most convenient one, is to simply let FormAssembly host it for you, since it just works out-of-the-box. However, since the form is not technically residing on your website, it’s won’t be included in your traffic report.
To fix this follow these 3 easy steps:
Setup the Tracking Code
1. Open your form in the Form Builder and add the ‘GA Tracking Code’ element, from the ‘Add Content’ menu
2. With the tracking code now present in your web form, you need to configure it with the desired Google Analytics profile ID (visit your Google Analytics account dashboard to obtain this value).
Click the Google Account ID field , click ‘options’ , then ‘advanced options’  and under ‘default value’  enter the ID .
3. Save your form and you’re almost good to go…
Enable Cross-Domain Tracking
So far, we’ve made sure that traffic to your web form will be reported in the desired Google Analytics profile, however, there is one more thing you need to do to make sure that the Google Analytics session carries on to your form and all tracking information is correctly measured.
For every page that includes a direct link to your form, or uses an iframe to display your form, add the following code:
This script expects the page to be configured with a Google Analytics tracking code. This script should be included after such tracking code.
As a reminder, these instructions only apply if FormAssembly is hosting the form for you. If you published the form using the copy&paste method (or the publishing REST API) and tracking is otherwise already set up on your site, you don’t need to do anything.
If you’re unsure about the instructions above or have any questions, don’t hesitate to contact us. We’re always happy to help.