Prerequisites

  1. Installed the FreshSales Smartform script on your website.
  2. These instructions assume that you have already installed either GA Connector WordPress plugin or GA Connector script on your website:

Create custom fields on FreshSales CRM

  1. To create custom fields on FreshSales, Go to Admin Setup > CRM Customization > Leads Module 
  2. Click on Add Field, select Text Field or Text Area and click on Add Selected.
  3. On the field properties, set the field label to the equivalent GA Connector field input ID that you want to Add. (e.g. All Traffic Sources – all_traffic_sources, First Click Channel – fc_channel).
  4. Click on Save.

For the full list of available GA Connector fields and its equivalent ID, see below:

LabelInput IDLabelInput ID
All Traffic Sources all_traffic_sourcesLast Click Campaignlc_campaign
BrowserbrowserLast Click Channellc_channel
City (from IP address)cityLast Click Contentlc_content
Country (from IP address)countryLast Click Landing Pagelc_landing
First Click Campaignfc_campaignLast Click Mediumlc_medium
First Click Channelfc_channelLast Click Referrerlc_referrer
First Click Contentfc_contentLast Click Sourcelc_source
First Click Landing Pagefc_landingLast Click Termlc_term
First Click Medium fc_mediumLatitudelatitude
First Click Referrerfc_referrerLongitudelongitude
First Click Sourcefc_sourceNumber of Website Visitspage_visits
First Click Termfc_termOperating SystemOS
Google Analytics CIDGA_Client_IDPages Visited pages_visited_list
Google Click IdentifiergclidTime Spent on Website time_passed
IP Addressip_addressTime Zone time_zone
RegionregionDevicedevice

Setting up your form

Now that you have created the custom fields on FreshSales, you need to set up your form so that the input elements’ label or ID matches with the custom fields that you have created. The input type of the fields that you create will need to be set as “text”, SmartForms will ignore your input element if it is set to “hidden”. In order for you to hide the elements into pageview, you can wrap your input elements inside a hidden div.

Example:

Smartforms will automatically map your form to their equivalent fields in Freshsales as long as the input label / ID matches the custom field label that you have set.

Using Contact Form 7

If you are using the WordPress plugin: Contact Form 7, you can easily create GA Connector fields on your form by pasting the code below in your form editor.