-
Notifications
You must be signed in to change notification settings - Fork 0
HubSpot Setup
John Williams edited this page Mar 11, 2026
·
1 revision
HubSpot has two complementary approaches. Use both for maximum coverage.
- HubSpot → Settings → Integrations → Google Ads
- Connect your Google Ads account
- Select conversion events to track (form submissions, meetings booked, etc.)
- HubSpot will automatically sync these as offline conversions to Google Ads
This works without any GCLID scripting. It uses HubSpot's own tracking.
HubSpot's URL pre-population only works when the user lands directly on the form page. If the user:
- Clicks an ad → goes to homepage → navigates to contact page → fills form
...the GCLID is lost. The script in this repo solves this with localStorage persistence.
1. Create GCLID contact property
- Settings → Properties → Contact Properties → Create
- Type: Single-line text
- Label:
GCLID - Internal name:
gclid__c
2. Add hidden field to forms
- Form editor → Add field → Hidden → select GCLID property
- Check: Pre-populate from URL parameter: gclid
3. Deploy scripts/hubspot.js via GTM
- Update
FIELD_MAPwith your HubSpot property internal names - Trigger: All Page Views
HubSpot → Settings → Properties → Contact → click a property → copy Internal name
Standard HubSpot analytics properties:
-
hs_analytics_source— traffic source -
hs_analytics_source_data_1— UTM medium -
hs_analytics_source_data_2— UTM campaign
Custom properties typically end in __c by convention.
| Issue | Fix |
|---|---|
| GCLID not populating | Field name mismatch — check FIELD_MAP vs internal name |
| URL pre-pop not working | User didn't land directly on form page — script handles this |
| HubSpot integration not importing | Re-authenticate in Settings → Integrations → Google Ads |