Add Google Analytics data to Salesforce web-to-lead with GA Connector’s Salesforce integration.
For the GA Connector Fields are able to work, you are expected to have already implemented the GA Connector Tracking Script on your website as it is outlined in this article.
How it works
Once you implement the GA Connector Field Extension to your SalesForce, you will then be able to track user behavior data via a Web-to-Lead form. You will be able to see the bigger picture of where and how your users are reaching you.
GA connector Fields will show you information such as First Click Data, Last Click Data and other miscellaneous information you may need in knowing more about your end customers. The fields listed below are what GA Connector can track for you.
How to implement GA Connector Fields to your Web-to-Lead forms:
1. Install this package on your Salesforce org.
2. You can then go to your Salesforce account, click on the Setup, look for the “Web-to-Lead” option and then Create Web-to-Lead Form.
3. Find the custom fields included in the package you just installed in the “Available fields” section. Then, move all of them to “Selected Fields” using the arrow buttons between these sections:
4. Click “Generate”, and Salesforce will create a new Web-to-Lead form for you and provide you with the HTML code that you need to implement on your website page.
Editing the code
Before you ask, you don’t need to replace your existing forms with this new form.
2. Put the codes in the existing form in your page right below the existing input field codes.
3. You will then have to omit the beginning of these codes until the “id” attribute
4. And replace them with the GA Connector id attributes.
More than just UTM parameters
GA Connector adds UTM information, geolocation, referral information to your Salesforce 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.
You just have to copy and paste the pre-generated codes below for each GA connector field you will be using.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
//First Click Data Fields First Click Campaign <input id="fc_campaign" style="display: none" First Click Channel <input id="fc_channel" style="display: none" First Click Content <input id="fc_content" style="display: none" First Click Landing Page <input id="fc_landing" style="display: none" First Click Medium <input id="fc_medium" style="display: none" First Click Referrer <input id="fc_referrer" style="display: none" First Click Source <input id="fc_source" style="display: none" First Click Term <input id="fc_term" style="display: none" //Last Click Data Fields Last Click Campaign <input id="lc_campaign" style="display: none" Last Click Channel <input id="lc_channel" style="display: none" Last Click Content <input id="lc_content" style="display: none" Last Click Landing Page <input id="lc_landing" style="display: none" Last Click Medium <input id="lc_medium" style="display: none" Last Click Referrer <input id="lc_referrer" style="display: none" Last Click Source <input id="lc_source" style="display: none" Last Click Term <input id="lc_term" style="display: none" //Additional Data Fields GA Client ID <input id="GA_Client_ID" style="display: none" Google Click Identifier <input id="gclid" style="display: none" All Traffic Sources <textarea id="all_traffic_sources" style="display: none" Browser <input id="browser" style="display: none" City (from IP address) <input id="city" style="display: none" Country (from IP address) <input id="country" style="display: none" IP Address <input id="ip_address" style="display: none" Latitude <input id="latitude" style="display: none" Longitude <input id="longitude" style="display: none" Number of Website Visits <input id="page_visits" style="display: none" Operating System <input id="OS" style="display: none" Pages Visited <textarea id="pages_visited_list" style="display: none" Time Spent on Website <input id="time_passed" style="display: none" Time Zone <input id="time_zone" style="display: none" Device <input id="device" style="display: none" Region <input id="region" style="display: none" |
Then put it inside your Web-to-Lead form, just above the closing </form> tag:
Once you complete these steps, you can now capture the values of the GA Connector Fields in your Salesforce Leads.