To add Google Analytics conversion tracking on the Thank You page of your online form, follow the steps below:
1. Follow our step-by-step guide on how to track form activity with Google Analytics.
2. Create a JavaScript file that contains the code shown below and upload it on the Web. Google Analytics and Universal Analytics use two different conversion tracking codes. Copy the code corresponding to the analytic type you are using from the table below.
Google Analytics | Universal Analytics |
var _gaq = _gaq || []; _gaq.push([‘_setAccount’, ‘UA-33613885-1‘]); _gaq.push([‘_setDomainName’, ‘123formbuilder.com’]); _gaq.push([‘_trackPageview’]); (function() { var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true; ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’; var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s); })(); |
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);ga(‘create’, ‘UA-62707254-1‘, ‘auto’); ga(‘send’, ‘pageview’); |
Replace UA-62707254-1 or UA-33613885-1 with your Google Analytics profile ID.
Load the file on a server from the Web. You will need it’s URL in the next step.
3. Go to the Settings → Advanced section of your form, check the box Add a JS script to the Thank You page of your form and paste the URL of the JavaScript file (.js) where your Google Analytics conversion tracking code is saved.
4. Hit Save changes and you are done.
Your email address will not be published. Required fields are marked *
Here is a list of the most frequently asked questions. For more FAQs, please browse through the FAQs page.
Google analytics conversion tracking – is it available in the free plan?
Hello Bogdan! On our basic plan you can track the form’s activity with Google Analytics. Check out our article about this subject here: https://salesforce.123formbuilder.com/docs/can-i-track-form-activity-with-google-analytics/
Have a nice day!