Prerequisites
- An active GA Connector account. In case you don’t have one yet, feel free to sign up for a 30-day free trial here.
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.
1 2 |
<script src="https://track.gaconnector.com/gaconnector.js" type="text/javascript"></script> <script type="text/javascript">gaconnector2.track('YOUR GA CONNECTOR ACCOUNT ID');</script> |
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.
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:
Label Input ID Label Input ID
All Traffic Sources all_traffic_sources Last Click Campaign lc_campaign
Browser browser Last Click Channel lc_channel
City (from IP address) city Last Click Content lc_content
Country (from IP address) country Last Click Landing Page lc_landing
First Click Campaign fc_campaign Last Click Medium lc_medium
First Click Channel fc_channel Last Click Referrer lc_referrer
First Click Content fc_content Last Click Source lc_source
First Click Landing Page fc_landing Last Click Term lc_term
First Click Medium fc_medium Last Click Timestamp lc_timestamp
First Click Referrer fc_referrer Longitude longitude
First Click Source fc_source Latitude latitude
First Click Term fc_term Number of Website Visits page_visits
First Click Timestamp fc_timestamp Operating System OS
Google Analytics CID GA_Client_ID Device device
Google Analytics Measurement ID GA_Measurement_ID Region region
Google Analytics Session ID GA_Session_ID Pages Visited pages_visited_list
Google Click Identifier gclid Time Spent on Website time_passed
IP Address ip_address Time 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.