Setting up Custom Fields in Hubspot

Creating Custom Fields in both Hubspot and Sumo then syncing them is quick, easy and painless! Here's an example of how to track which campaign, popup and URL your subscribers come from.

Create a Contact Property in Hubspot

HubSpot has an excellent guide on how to create custom fields (called Contact Properties) here.

Here is a quick breakdown. In your HubSpot account you would go to Contacts > Contact Settings

Once you do that you'll be given a dialog box to fill out.

  • label - This is the label you want to use for your organization. I've labeled it "source".
  • internal name - The name that must match the Sumo variable. This auto fills as your label but you can change it. I have left it as source.
  • field type - This is the type of data youre collecting. You will need to select single line text.

It should look similar to this in Hubspot:

From here you will want to make sure it's viewable in the list you're writing to from Sumo. Go to Contacts > List > (List you want to write to). (Please remember Sumo only works with static lists).

From here, click on the menu on the right, search for the label and add it.


Create a Custom Field in Sumo

Now from the Sumo side you will want to go to the Popup you're configuring and click on the "Fields" tab to add a hidden field:

  • Field Name = label you use for the Sumo side. I have used "source"
  • Variable Name - Must match the Internal Name for your hubspot list so we have "source" here as well
  • Field Value - This is either a static entry or use one of our provided entries by clicking on the {}. Please note that our hidden field pre defined values are very useful and you might find this fits your needs:
    • {client_ip} - IP of subscriber
    • {campaign_name} - Full name of Campaign that collected the subscriber information. Example: "Campaign #1"
    • {campaign_slug} - Campaign name that collected subscriber information without spaces or special characters. Example: "campaign_1"
    • {country} - Country of subscriber based on geo location of IP
    • {popup_name} - Full name of Popup that collected the subscriber information. Example: "Popup Awesome #1"
    • {popup_slug} - Popup name that collected subscriber information without spaces or special characters. Example: "popup_awesome_1"
    • {referrer} - URL where subscriber came from before subscribing
    • {href} - URL where subscriber subscribed
    • {user_agent} - Name, version and platform of browser used by subscriber

You may use more than one of these variables in conjunction with any hard coded variable you want to use. For this example we'll use:

{campaign_slug} {popup_slug} {href}

Now that the popup is set, make sure it's in the correct campaign that has the list you want write to in your HubSpot account.

Once your visitors fill out the email collection popup you can check your list on HubSpot:

There you have it! :)

This is how you can add in tracking the source for your signups without any issue or needing to rely on cookie data.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.