1. Help Center
  2. Analytics Amplifier
  3. How To Use Analytics Amplifier

Non-HubSpot form config

Capture Google Client ID on non HubSpot forms. Wordpress, Drupal or any other custom form you would like to use.

If you are using non HubSpot forms but still pushing the data via API you can still capture the Google Client ID very easily. 

Option 1: HubSpot Form API

If you are using the HubSpot Form API capturing the Google Client ID is very straight forward - ensure:

  • The Google Client ID (google_client_id) is added as a hidden field on your custom form. 
  • The hidden field name should be "google_client_id" (to ensure our Javascript snippet can find and update the correct field)
  • Install the Javascript snippet in the footer of your website
  • Ensure the Google Analytics tracking code is loaded before our Javascript snippet (this is important as the Google Client ID cookie must be set before it can be read)

Option 2: HubSpots tracking code collection for non-forms

Non-HubSpot forms are HTML forms on your external site that weren't created in HubSpot. With the HubSpot tracking code installed on your external page, submissions to non-HubSpot forms will be collected in HubSpot. Read more about it here.

Issues with this method: 

  • Hidden fields will not be captured so you will need to add some additional styling or inline CSS to hide the "google_client_id"
  • It works best if the label also matches the HubSpot label property

Code example below:

<div style="display: none;">
<label>Google Client ID</label><br>
<input type="text" name="google_client_id" id="google_client_id" value="">