{"id":205,"date":"2017-04-25T11:22:58","date_gmt":"2017-04-25T11:22:58","guid":{"rendered":"http:\/\/support.gaconnector.com\/?p=205"},"modified":"2025-09-22T12:43:12","modified_gmt":"2025-09-22T12:43:12","slug":"generate-a-web-to-lead-form-in-salesforce-with-ga-connector-fields","status":"publish","type":"post","link":"https:\/\/gaconnector.com\/docs\/generate-a-web-to-lead-form-in-salesforce-with-ga-connector-fields\/","title":{"rendered":"Generate a Web-to-Lead form in Salesforce (with GA Connector fields)"},"content":{"rendered":"<p data-pm-slice=\"1 1 [&quot;blockquote&quot;,{}]\">The instructions below apply to\u00a0<strong>Cookie-Based integration<\/strong>.<\/p>\n<p data-pm-slice=\"1 1 [&quot;blockquote&quot;,{}]\">If you are using\u00a0<strong>API-Based integration<\/strong>, simply add the GA Connector script to your main website. No additional steps are required.<\/p>\n<p data-pm-slice=\"1 1 [&quot;blockquote&quot;,{}]\">Not sure which instructions to follow? Start here:\u00a0<strong><a class=\"ProsemirrorEditor-link\" href=\"https:\/\/gaconnector.com\/docs\/how-to-check-which-ga-connector-integration-type-youre-using\/\">How to Check Which GA Connector Integration Type You\u2019re Using<\/a>.<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">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<\/span> <a href=\"https:\/\/gaconnector.com\/docs\/how-to-add-ga-connector-tracking-data-into-your-crm\/#installation\"><span style=\"font-weight: 400;\">this article<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h2><b>How it works<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">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. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">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.<\/span><\/p>\n<figure id=\"attachment_207\" aria-describedby=\"caption-attachment-207\" style=\"width: 700px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"size-large wp-image-207\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/6bdf50cd62b5a7c6b3ea8df1068a652f-700x805.png\" alt=\"List of fields from our Basic Integration Package\" width=\"700\" height=\"805\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/6bdf50cd62b5a7c6b3ea8df1068a652f-700x805.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/6bdf50cd62b5a7c6b3ea8df1068a652f-261x300.png 261w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/6bdf50cd62b5a7c6b3ea8df1068a652f-768x883.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/6bdf50cd62b5a7c6b3ea8df1068a652f.png 1360w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption id=\"caption-attachment-207\" class=\"wp-caption-text\">List of fields from our Basic Integration Package<\/figcaption><\/figure>\n<h2><b>How to implement GA Connector Fields to your Web-to-Lead forms:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">1. Install <\/span><a href=\"https:\/\/gaconnector.com\/docs\/documentation-for-our-basic-integration-salesforce-package\/\"><span style=\"font-weight: 400;\">this package<\/span><\/a><span style=\"font-weight: 400;\"> on your Salesforce org.<\/span><\/p>\n<p>2. You can then go to your Salesforce account, click on the\u00a0<strong><span class=\"c18 c25\">Setup<\/span><\/strong><span class=\"c18\">, look for the \u201c<\/span><strong><span class=\"c18 c25\">Web-to-Lead<\/span><\/strong><span class=\"c18\">\u201d option and then\u00a0<\/span><span class=\"c28 c18 c25\"><strong>Create Web-to-Lead Form<\/strong>.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-2187\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1-700x227.png\" alt=\"Salesforce web-to-lead\" width=\"700\" height=\"227\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1-700x227.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1-300x97.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1-768x249.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1-60x19.png 60w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1-150x49.png 150w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-4-1.png 1348w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>3. Find the custom fields included in the\u00a0package you just\u00a0installed<span data-offset-key=\"63nda-2-0\">\u00a0in the \u201cAvailable fields\u201d section. Then, move all of them to \u201cSelected Fields\u201d using the arrow buttons between these sections:<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2188\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Draft-Suggested-updates-to-Salesforce-Integrat-1.png\" alt=\"Salesforce web-to-lead setup\" width=\"373\" height=\"386\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Draft-Suggested-updates-to-Salesforce-Integrat-1.png 373w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Draft-Suggested-updates-to-Salesforce-Integrat-1-290x300.png 290w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Draft-Suggested-updates-to-Salesforce-Integrat-1-58x60.png 58w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Draft-Suggested-updates-to-Salesforce-Integrat-1-145x150.png 145w\" sizes=\"(max-width: 373px) 100vw, 373px\" \/><\/p>\n<p>4. Click \u201cGenerate\u201d, and Salesforce will create a new Web-to-Lead form for you\u00a0<span class=\"c1\">and provide you with the HTML code that you need to implement on your website page.<\/span><\/p>\n<p><span class=\"c1\"><img decoding=\"async\" class=\"alignnone wp-image-826\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-.png\" alt=\"\" width=\"448\" height=\"193\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-.png 1126w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps--300x129.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps--768x331.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps--700x302.png 700w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/span><\/p>\n<h2>Editing the code<\/h2>\n<p>Before you ask, you don&#8217;t need to replace your existing forms with this new form.<\/p>\n<div class=\"\" data-block=\"true\" data-editor=\"4amm6\" data-offset-key=\"5ub8c-0-0\">\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"5ub8c-0-0\"><span data-offset-key=\"5ub8c-2-2\">You <\/span><span class=\"qualifier\"><span data-offset-key=\"5ub8c-3-0\">just<\/span><\/span><span data-offset-key=\"5ub8c-4-0\"> need to:<\/span><\/div>\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"5ub8c-0-0\"><\/div>\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"5ub8c-0-0\">1. Locate the GA Connector fields from this new form<\/div>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-2189\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1-700x302.png\" alt=\"Salesforce web-to-lead code\" width=\"700\" height=\"302\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1-700x302.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1-300x129.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1-768x331.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1-60x26.png 60w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1-150x65.png 150w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Web-to-Lead-Salesforcehttps-1-1.png 1126w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>2. Put the codes in the existing form in your page right below the existing input field codes.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-822\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-6.png\" alt=\"Salesforce web-to-lead code 2\" width=\"583\" height=\"467\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-6.png 583w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-6-300x240.png 300w\" sizes=\"(max-width: 583px) 100vw, 583px\" \/><\/p>\n<p>3. You will then have to omit the beginning of these codes until the \u201cid\u201d attribute<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-821\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-1-1-700x346.png\" alt=\"Salesforce web-to-lead code 3\" width=\"700\" height=\"346\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-1-1-700x346.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-1-1-300x148.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-1-1-768x380.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-1-1.png 847w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>4. And replace them with the GA Connector id attributes.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-820\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-2-700x326.png\" alt=\"Salesforce web-to-lead code 5\" width=\"700\" height=\"326\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-2-700x326.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-2-300x140.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-2-768x357.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/Edit-Page-\u2039-Test-website-\u2014-WordPresshttps-gaconnector.com-test-site-wp-admin-post.php-post38actionedit-2.png 845w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>More than just UTM parameters<\/h2>\n<p>GA Connector adds UTM information, geolocation, referral information to your Salesforce leads.<\/p>\n<p>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.<\/p>\n<p>You just have to copy and paste the pre-generated codes below for each GA connector field you will be using.<\/p>\n<\/div>\n<pre class=\"font-size:11 expand:true lang:default decode:true \" title=\"GA Connector ID Attributes\">\/\/First Click Data Fields\r\nFirst Click Campaign         &lt;input id=\"fc_campaign\" style=\"display: none\"\r\nFirst Click Channel          &lt;input id=\"fc_channel\" style=\"display: none\"\r\nFirst Click Content          &lt;input id=\"fc_content\" style=\"display: none\"\r\nFirst Click Landing Page     &lt;input id=\"fc_landing\" style=\"display: none\"\r\nFirst Click Medium           &lt;input id=\"fc_medium\" style=\"display: none\"\r\nFirst Click Referrer         &lt;input id=\"fc_referrer\" style=\"display: none\"\r\nFirst Click Source           &lt;input id=\"fc_source\" style=\"display: none\"\r\nFirst Click Term             &lt;input id=\"fc_term\" style=\"display: none\"\r\n\r\n\/\/Last Click Data Fields\r\nLast Click Campaign          &lt;input id=\"lc_campaign\" style=\"display: none\"\r\nLast Click Channel           &lt;input id=\"lc_channel\" style=\"display: none\"\r\nLast Click Content           &lt;input id=\"lc_content\" style=\"display: none\"\r\nLast Click Landing Page      &lt;input id=\"lc_landing\" style=\"display: none\"\r\nLast Click Medium            &lt;input id=\"lc_medium\" style=\"display: none\"\r\nLast Click Referrer          &lt;input id=\"lc_referrer\" style=\"display: none\"\r\nLast Click Source            &lt;input id=\"lc_source\" style=\"display: none\"\r\nLast Click Term              &lt;input id=\"lc_term\" style=\"display: none\"\r\n\r\n\/\/Additional Data Fields\r\nGA Client ID                 &lt;input id=\"GA_Client_ID\" style=\"display: none\"\r\nGoogle Click Identifier\u00a0 \u00a0 \u00a0 &lt;input id=\"gclid\" style=\"display: none\"\r\nAll Traffic Sources          &lt;textarea id=\"all_traffic_sources\" style=\"display: none\" \r\nBrowser                      &lt;input id=\"browser\" style=\"display: none\"\r\nCity (from IP address)       &lt;input id=\"city\" style=\"display: none\"\r\nCountry (from IP address)    &lt;input id=\"country\" style=\"display: none\"\r\nIP Address                   &lt;input id=\"ip_address\" style=\"display: none\"\r\nLatitude                     &lt;input id=\"latitude\" style=\"display: none\"\r\nLongitude                    &lt;input id=\"longitude\" style=\"display: none\"\r\nNumber of Website Visits     &lt;input id=\"page_visits\" style=\"display: none\"\r\nOperating System             &lt;input id=\"OS\" style=\"display: none\"\r\nPages Visited                &lt;textarea id=\"pages_visited_list\" style=\"display: none\"\r\nTime Spent on Website        &lt;input id=\"time_passed\" style=\"display: none\"\r\nTime Zone                    &lt;input id=\"time_zone\" style=\"display: none\"\r\nDevice                       &lt;input id=\"device\" style=\"display: none\"\r\nRegion                       &lt;input id=\"region\" style=\"display: none\"<\/pre>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 30px;\"><span class=\"c18\">Then put it inside your Web-to-Lead form, just above the closing\u00a0<\/span><span class=\"c18 c25\">&lt;\/form&gt;<\/span><span class=\"c1\">\u00a0tag:<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-819\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-7-700x280.png\" alt=\"Salesforce web-to-lead code \" width=\"700\" height=\"280\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-7-700x280.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-7-300x120.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-7-768x307.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-7.png 846w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p><span class=\"c18\">Once you complete these steps, you can now capture the values of the GA Connector Fields in your Salesforce Leads<\/span><span class=\"c1\">.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-829\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-8-1-700x196.png\" alt=\"Salesforce leads\" width=\"700\" height=\"196\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-8-1-700x196.png 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-8-1-300x84.png 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-8-1-768x215.png 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/04\/pasted-image-0-8-1.png 1356w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The instructions below apply to\u00a0Cookie-Based integration. If you are using\u00a0API-Based integration, simply add the GA Connector script to your main website. No additional steps are required. Not sure which instructions to follow? Start here:\u00a0How to Check Which GA Connector Integration Type You\u2019re Using. For the GA Connector Fields are able to work, you are expected [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,16],"tags":[],"_links":{"self":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/205"}],"collection":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/comments?post=205"}],"version-history":[{"count":27,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/205\/revisions"}],"predecessor-version":[{"id":3732,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/205\/revisions\/3732"}],"wp:attachment":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/media?parent=205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/categories?post=205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/tags?post=205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}