APIs & Integrations

Mansoor
Membro

How to pass UTM information when creating a contact through the API

resolver

Hey! 


I am currently able to create a contact using the hubspot API. 


I'd like to pass the UTM information so when creating it doesn't say created by the API but created by the correct campaign. 

 

I've tried adding the hutk cookie value and passed it as a property in hubspot but nothing. 


Maybe my approach is wrong would love some insight on how to accomplish this. 

 

Current: 

Analytics says we are creating the contact from the API (which is technically correct)

 

Expected outcome:
Create a contact and have the Analytics say its from the campaign we put together rather then created by the API. 

 

Any help is appreciated!

 

1 Solução aceita
Teun
Solução
Especialista reconhecido(a) | Parceiro Diamante
Especialista reconhecido(a) | Parceiro Diamante

How to pass UTM information when creating a contact through the API

resolver

Hi @Mansoor ,

 

You are probably using the Contacts API. But what you want is the Form submission API.

 

The Form submission API expects you to create a certain form and send the contact data as a form submission to this endpoint. You can also pass it the 'hutk' cookie value and it will show you everything you need (including website behaviour etc.) if you have the HubSpot tracking script installed.

 

It will show up as a form submission on the form you created and the contact will have all data you need in the timeline and the properties.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


Exibir solução no post original

0 Avaliação positiva
4 Respostas 4
BBlakeley
Membro

How to pass UTM information when creating a contact through the API

resolver

Hi @Teun,

 

With v3 of the HubSpot API being deprecated, do you know how to do this with the latest version of the API? There doesn't seem to be an equivalent form submission endpoint.

 

Thanks,

0 Avaliação positiva
Teun
Especialista reconhecido(a) | Parceiro Diamante
Especialista reconhecido(a) | Parceiro Diamante

How to pass UTM information when creating a contact through the API

resolver

Hi @Mansoor ,

 

This will only work with contacts, but you could create a workflow that creates a deal when a form is submitted. You could use one single form for all submissions, but you could create unique forms for each submission type.

The process you described is correct.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Avaliação positiva
Mansoor
Membro

How to pass UTM information when creating a contact through the API

resolver

Hey @Teun ,


That is correct I am using the Contacts API. 

So what does the flow look something like this.

Create a form that on submission creates a contact

API will then submit to the form and send over the hutk.

Does this work with deals? Does it mean that I always have to create a new form? 


Teun
Solução
Especialista reconhecido(a) | Parceiro Diamante
Especialista reconhecido(a) | Parceiro Diamante

How to pass UTM information when creating a contact through the API

resolver

Hi @Mansoor ,

 

You are probably using the Contacts API. But what you want is the Form submission API.

 

The Form submission API expects you to create a certain form and send the contact data as a form submission to this endpoint. You can also pass it the 'hutk' cookie value and it will show you everything you need (including website behaviour etc.) if you have the HubSpot tracking script installed.

 

It will show up as a form submission on the form you created and the contact will have all data you need in the timeline and the properties.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Avaliação positiva