Google Analytics Tracking 


In this Article
Related Articles


Overview

If you published your forms with the Copy & Paste method or the REST API, and tracking is otherwise already set up on your site, you don't need to do anything to track your forms.

However, if you use FormAssembly to host your forms, follow these steps to add Google Analytics tracking:


Setup the Tracking Code

  1. Open your form in the Form Builder and add the GA Tracking Code element from the Add Content menu.

    Adding Google Analytics Tracking Code to your Web Form

  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].

    Configuring your Google Analytics Tracking Code

    Entering your Google Account 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:

<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. Note that the script expects the page to be configured with a Google Analytics tracking code, and this script should be included after that tracking code.


Additional Notes to Consider

Please Note:

  • Results can take a day to appear in Google Analytics
  • Results are approximate and are not an exact representation of people that have opened the form
  • Some people will have ad blockers which will prevent Google Analytics from tracking them
Terms of Service · Privacy Policy