Add Google Analytics data to Formstack with GA Connector’s Forkstack integration.
Prerequisites
- Installed either GA Connector WordPress plugin or GA Connector script on your website:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<script data-cfasync="false" type="text/javascript" src="https://tracker.gaconnector.com/gaconnector.js"></script> <script> function setGaconnectorHiddenFields() { var gaFields = gaconnector.getCookieValues(); for (var fieldName in gaFields) { var selectors = 'form input[name="' + fieldName + '"], form input#' + fieldName + ', form input#field_' + fieldName + ', form input[name="' + fieldName.toLowerCase() + '"], form input#' + fieldName.toLowerCase() + ', form input#field_' + fieldName.toLowerCase() + ', input[value="gaconnector_' + fieldName + '"],'; selectors += 'form textarea[name="'+fieldName+'"], form textarea#'+fieldName+', form textarea#field_'+fieldName + ', form textarea[name="'+fieldName.toLowerCase()+'"], form textarea#'+fieldName.toLowerCase()+', form textarea#field_'+fieldName.toLowerCase()+', form textarea.'+fieldName+', form textarea[name="param['+fieldName+']"]'+", form textarea[id^='field_"+fieldName+"']"; var inputs = document.querySelectorAll(selectors); if (inputs === null) { continue; } else if (typeof inputs.length === 'undefined') { inputs.value = gaFields[fieldName]; } else { for (var i = 0; i < inputs.length; i++) { inputs[i].value = gaFields[fieldName]; } } } } gaconnector.setCallback(setGaconnectorHiddenFields); setInterval(setGaconnectorHiddenFields, 1000); </script> |
Setting up the GA Connector Fields on Formstack Form Editor
Step 1
Click on the build section and add a Short Answer field on the form that you are editing
Step 2
Click on the newly created field and set the Field Label and Default Value to match the GA Connector field that you want to track. (e.g. gaconnector_all_traffic_sources). A full list of GA Connector fields and its equivalent ID can be found at the bottom of this page.
Step 3
Click on the Hidden checkbox so that the field that you’ve created is hidden on your form
Step 4
Embed your form your website, if not already done.
More than just UTM parameters
GA Connector adds UTM information, geolocation, referral information to your Formstack leads.
See below for all the information that you can add to your leads to help you find out which of your marketing activities drive sales.
Label | Input ID | Label | Input ID |
---|---|---|---|
All Traffic Sources | gaconnector_all_traffic_sources | Last Click Campaign | gaconnector_lc_campaign |
Browser | gaconnector_browser | Last Click Channel | gaconnector_lc_channel |
City (from IP address) | gaconnector_city | Last Click Content | gaconnector_lc_content |
Country (from IP address) | gaconnector_country | Last Click Landing Page | gaconnector_lc_landing |
First Click Campaign | gaconnector_fc_campaign | Last Click Medium | gaconnector_lc_medium |
First Click Channel | gaconnector_fc_channel | Last Click Referrer | gaconnector_lc_referrer |
First Click Content | gaconnector_fc_content | Last Click Source | gaconnector_lc_source |
First Click Landing Page | gaconnector_fc_landing | Last Click Term | gaconnector_lc_term |
First Click Medium | gaconnector_fc_medium | Last Click Timestamp | gaconnector_lc_timestamp |
First Click Referrer | gaconnector_fc_referrer | Longitude | gaconnector_longitude |
First Click Source | gaconnector_fc_source | Latitude | gaconnector_latitude |
First Click Term | gaconnector_fc_term | Number of Website Visits | gaconnector_page_visits |
First Click Timestamp | gaconnector_fc_timestamp | Operating System | gaconnector_OS |
Google Analytics CID | gaconnector_GA_Client_ID | Device | gaconnector_device |
Google Analytics Measurement ID | gaconnector_GA_Measurement_ID | Region | gaconnector_region |
Google Analytics Session ID | gaconnector_GA_Session_ID | Pages Visited | gaconnector_pages_visited_list |
Google Click Identifier | gaconnector_gclid | Time Spent on Website | gaconnector_time_passed |
IP Address | gaconnector_ip_address | Time Zone | gaconnector_time_zone |