Prerequisites

1. Install GA Connector tracking code on your website

In our setup wizard, a piece of code will be provided to you. You need to add this on the <head> portion of your website and it needs to be placed on every page of your website, even on the pages without lead generation forms.


You can also opt to install our GA Connector script via GTM in order to optimize how it loads.

2. Install the GA Connector App for HubSpot

Installing the GA Connector app in HubSpot will automatically create custom fields in your contact object. Once a web visitor submits your form to become a Contact, and your form is properly configured (see next step), the created Contact should contain tracking information once it arrives in HubSpot.

HubSpot Contact with GA Connector data

3. Configure your web forms

The script you’ve added to your website from the first step identifies the source, medium and other Google Analytics information about your web visitors and stores them via cookies in the browser. In order to send this to HubSpot, you’ll need to create hidden fields to your forms and map them to the custom fields that were created in HubSpot by the GA Connector App.

In order for GA Connector to know where are your hidden fields, you need to set the hidden fields’ ID, name or class to the corresponding GA Connector ID based on the table 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_mediumLast Click Timestamplc_timestamp
First Click Referrerfc_referrerLongitudelongitude
First Click Sourcefc_sourceLatitudelatitude
First Click Termfc_termNumber of Website Visitspage_visits
First Click Timestampfc_timestampOperating SystemOS
Google Analytics CIDGA_Client_IDDevicedevice
Google Analytics Measurement IDGA_Measurement_IDRegionregion
Google Analytics Session IDGA_Session_IDPages Visited pages_visited_list
Google Click IdentifiergclidTime Spent on Website time_passed
IP Addressip_addressTime Zone time_zone

Note: you don’t need to create all the hidden fields, just the ones that you want to track.

3.1 Integrating with HubSpot Forms

If you’re using HubSpot Forms, the GA Connector app for HubSpot can automatically add these fields to your form. 

A sample form is also created when you install the GA Connector app. You can find this at HubSpot CRM dashboard > Marketing > Forms. You can duplicate and customize this according to your needs.

In case you already have a form, you can automatically add hidden fields to this using our HubSpot form setup wizard.

Just select which form you want the hidden fields to be added and use the embed code generated by the setup wizard.

4. Tag your paid traffic with UTM parameters (optional)

GA Connector will automatically recognize leads coming from Google Ads, but by default – only source and medium parameters.

In order to track campaigns and keywords too, you need to configure Google Ads to add UTM tags to ad links. GA Connector will pick up information from these tags and save it to the CRM.

Take it to the next level!

Import HubSpot data to Google Analytics to see what’s driving revenue. GA Connector imports stats on closed deals from HubSpot, allowing you to see deals closed by your sales team in Google Analytics (Paid Add-on)

Find out more regarding this add-on and how to set it up here.