Google Analytics with Custom Forms
Google Analytics with Custom Forms
1. Add Roadway Tag
Add the following script tag to the <head>
section of your website or on Google Tag Manager to All Pages:
2. Salesforce CRM
If you’re using Salesforce for your CRM, you need to add a hidden field, custom property, and map those in your integration. Roadway tag will take care of the rest.
Add Hidden Field to Form:
Navigate to your form
Add a hidden field named
ga4_pseudo_user_id
.
Create Salesforce Property:
Log into Salesforce and enter the Setup menu.
Navigate to Object Manager and select the "Contact" object.
Click "Fields & Relationships" then select "New."
Choose "Text" as the field type and set the field label to
ga4_pseudo_user_id
.Specify the field length to 255.
Confirm the settings and click "Next."
Click "Next" again on step 3 "Establish field-level security".
Click "Save" on step 4 "Add to page layouts".
Detailed instructions are available in the Salesforce Custom Field Guide.
Map Form field to Salesforce:
Navigate to your Salesforce account settings.
Click on "Integrations" and select your form integration
Add the new
ga4_pseudo_user_id
field mapping to the mappingClick "Save" to apply the mapping.
2. Hubspot CRM
Add Hidden Field to Form:
Navigate to your form
Add a hidden field named
ga4_pseudo_user_id
.
Add Hidden Field to HubSpot Form:
Log into HubSpot, navigate to your Forms
Click on the "Edit" button for the form(s) you want to edit
On the "existing fields" section, search for and add the
ga4_pseudo_user_id
contact property you just createdOn the new
ga4_pseudo_user_id
input field, click on the "Edit" button and click the "Make this field hidden" boxClick the "Update" button in top right corner
For details, see HubSpot Forms Guide.
Create Hubspot contact Property:
Log into HubSpot and select account "Settings" from the dropdown menu.
In the left sidebar menu, go to "Properties" under the "Data Management" section.
Click the "Create property" button in the upper right corner.
Configure Property Details:
Object Type: Select "Contact" to ensure the property is associated with contact records.
Group: Choose an existing property group (e.g., "Contact Information") or create a new group to organize your properties.
Label: Enter
ga4_pseudo_user_id
as the property name.Field Type: Select "Single-line text" to match the Salesforce "Text" field type.
Configure field to be "Hidden".
Save the Property: After verifying the details, click "Create" to finalize the new contact property.
Last updated