CRM

ialonso
Participant

Using UTMs when creating contacts from API

Hi there,

 

I am facing the following situation:

  • My Hubspot account is synced with my product via API.
  • I am creating contacts by sending the user detaills (name, email...) I collect in the registration process to a Hubspot Form.

What's happening now, is that I am not getting proper data for Original and Last Source, and I'm neither getting the information of utms.

 

How can I have this information filled in the CRM. Are there any utm properties available in Hubspot, If so, how can I send the data to Hubspot throught the API?

 

Thanks! This is really being a huge headache!

0 Upvotes
3 Replies 3
ialonso
Participant

Using UTMs when creating contacts from API

 Thank you so much for the response. So, let's say I create 3 contact properties:

  • utm_source
  • utm_medium
  • utm_campaign

When I create the contact sending the data to the form via API, I could send these 3 values.

Additionally, I should create a workflow which will populate the following properties:

  • Original Source: following the rules you've mentioned in the article.
  • Original Source Analytics 1: do you have some extra information on what usually goes in here so I can create a workflow taht replicates this?
  • Original Source Analytics 2: do you have some extra information on what usually goes in here so I can create a workflow taht replicates this?

If there are not "standard" rules, or it doesn't have an effect on Hubspot Analytics, I will just create my own rules based on utm parameters to set these 2 extra properties.

 

Thanks in advance!

0 Upvotes
JPanama
HubSpot Moderator
HubSpot Moderator

Using UTMs when creating contacts from API

Hi @ialonso

 

At this time it's only possible to change the Original Source property. It's not possible to change the Drilldown values as they are read-only. One thing to note is when you change the Original (or Latest Source) property, the Drill Down values will be cleared to their original values. You can learn more about how those Drill Down values are set in this article here

 

Best, 
Joe (HubSpot Moderator)

 

 

JPanama
HubSpot Moderator
HubSpot Moderator

Using UTMs when creating contacts from API

Hi @ialonso, thanks for getting in touch.

 

There are a couple of items here. I understand you wish to create Contacts by sending data to a HubSpot Form and in doing so pass their UTMs to the Contact record. I think it's worth providing some fuller context as to how we set the Original Source properties. Here's how that works: 

 

  1. Generally speaking, we look at the First Page Seen property for a Contact. 
  2. We scan the URL for various parameters (utm_source, utm_medium etc)
  3. The 1st rule in this table that is successfully met then determines this Original Source. 

 

Usually, any Contacts created by Form Submission that do not meet the rules mentioned above will be set as Offline Sources with a Drill Down value that contains the Form ID

HubSpot automatically sets a contact's Original Source (hs_analytics_source) value based on analytics data associated with the hutk value passed in a form submisson and the afforementioned criteria. It is not possible to set hs_analytics_source or hs_analytics_source_data_1 directly via a form submission.

 

You can set the Original Source property after the Contact is created either via Workflow, or via the Contacts API. 

 

I hope that's cleared some of this up for you. Let me know if there's anything you'd like me to clarify. 

Best,
Joe (HubSpot Moderator)