How to make sure your web forms are tracked with Google Analytics
February 3rd, 2012 by Cedric Savarese
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 [1], click ‘options’ [2], then ‘advanced options’ [3] and under ‘default value’ [4] enter the ID [5].
![]()
![]()
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:
<script type="text/javascript" src="//tfaforms.com/js/ga_crossdomain_tracking.js"></script>
This little piece of javascript code insures that cross-domain tracking is correctly configured.
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.
















Get email updates on FormAssembly

