If you're integrating with Salesforce or Zoho CRM, this article may not apply because you're most likely using GA Connector API-based integration.

GA Connector relies on your hidden input fields’ attributes so that it would be able to find them and fill them with tracking information. Our default GA Connector script will be able to fill your hidden fields with tracking information as long as you are able to set their id/name with its equivalent GA Connector ID.

However, there are cases where the third-party form plugin that you are using doesn’t allow you to control the form’s attributes and customize its input class or ID. For these cases, we have prepared specific instructions on how to integrate GA Connector with your form.

If your form doesn’t allow you to customize the class/id attributes but you are able to set a default value

  1. Create an input element and have it set to “hidden
  2. Add a default value to the input element you’ve just added. The default value must be equivalent to the field that you are trying to track. See the table below for the full list of fields that you can track using GA Connector.
LabelInput IDLabelInput ID
All Traffic Sources gaconnector_all_traffic_sourcesLast Click Campaigngaconnector_lc_campaign
Browsergaconnector_browserLast Click Channelgaconnector_lc_channel
City (from IP address)gaconnector_cityLast Click Contentgaconnector_lc_content
Country (from IP address)gaconnector_countryLast Click Landing Pagegaconnector_lc_landing
First Click Campaigngaconnector_fc_campaignLast Click Mediumgaconnector_lc_medium
First Click Channelgaconnector_fc_channelLast Click Referrergaconnector_lc_referrer
First Click Contentgaconnector_fc_contentLast Click Sourcegaconnector_lc_source
First Click Landing Pagegaconnector_fc_landingLast Click Termgaconnector_lc_term
First Click Medium gaconnector_fc_mediumLast Click Timestampgaconnector_lc_timestamp
First Click Referrergaconnector_fc_referrerLongitudegaconnector_longitude
First Click Sourcegaconnector_fc_sourceLatitudegaconnector_latitude
First Click Termgaconnector_fc_termNumber of Website Visitsgaconnector_page_visits
First Click Timestampgaconnector_fc_timestampOperating Systemgaconnector_OS
Google Analytics CIDgaconnector_GA_Client_IDDevicegaconnector_device
Google Analytics Measurement IDgaconnector_GA_Measurement_IDRegiongaconnector_region
Google Analytics Session IDgaconnector_GA_Session_IDPages Visited gaconnector_pages_visited_list
Google Click Identifiergaconnector_gclidTime Spent on Website gaconnector_time_passed
IP Addressgaconnector_ip_addressTime Zone gaconnector_time_zone

If your form doesn’t allow you to customize the class/id attributes and you are unable to set a default value

  1. Create the hidden input elements in your form editor and publish it. (This is because we need to list down the created input element’s ID/class)
  2. Open up page inspector (cmd + shift + c for MacOS, ctrl + shift+ c for Windows) and look for the created input and list down its class or ID
  3. Modify the code below and add the GA Connector field ID (without the “gaconnector_” prefix) along with the class/id of the input you’ve created.

    Example
    : You want to track the field
    ‘All Traffic Sources’. Add the equivalent id of the field and on the right side of the code, add id/class of the hidden input you’ve created for it in quotation marks. (repeat this for all the fields that you need to track)all_traffic_sources: ‘id-of-created-input’,
  4. After adding all the fields that you need. Install the code that you have modified above in the <head> of your website.
  5. Add the code below in the <head> of your website, this needs to be placed right after the fieldMapping code that you have just added.

  6. Done! You should now have tracking information filling up your hidden fields.