Segment with Custom Forms

Segment 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:

<script defer src="//analytics.roadwayai.com/tag.js"></script>

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:

    1. Navigate to your form

    2. Add a hidden field named segment_anon_id.

  • Create Salesforce Property:

    1. Log into Salesforce and enter the Setup menu.

    2. Navigate to Object Manager and select the "Contact" object.

    3. Click "Fields & Relationships" then select "New."

    4. Choose "Text" as the field type and set the field label to segment_anon_id.

    5. Specify the field length and visibility settings as needed.

    6. Confirm the settings and click "Save."

    Detailed instructions are available in the Salesforce Custom Field Guide.

  • Map Form field to Salesforce:

    1. Navigate to your Salesforce account settings.

    2. Click on "Integrations" and select your form integration

    3. Add the new segment_anon_id field mapping to the mapping

    4. Click "Save" to apply the mapping.

2. Hubspot CRM

  • Add Hidden Field to Form:

    1. Navigate to your form

    2. Add a hidden field named segment_anon_id.

  • Add Hidden Field to HubSpot Form:

    1. Log into HubSpot, navigate to your Forms

    2. Click on the "Edit" button for the form(s) you want to edit

    3. On the "existing fields" section, search for and add the segment_anon_id contact property you just created

    4. On the new segment_anon_id input field, click on the "Edit" button and click the "Make this field hidden" box

    5. Click 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 segment_anon_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.