APIs & Integrations

PCleaud
Colaborador(a)

Track custom behavioural event through Hubspot

resolver

Hello,

 

I am trying to track a custom behavioral event through Google Tag Manager on an external website.

 

Setup :

  • All pages of the website have the Hubspot tracking code
  • I have created a manually tracked event in Hubspot
  • I have created a custom HTML tag in Google tag manager with the following code in it:

 

 

<script type="text/javascript">
_hsq.push(['trackCustomBehavioralEvent',{ 
  Name: "InternalNameOfOurCustomEvent",
  properties: { hs_asset_type: "landing-page",
              	hs_app_name: "NameOfOurApp"}
}
]);
</script>

 

 

 

  • I have created a trigger in Google Tag Manager to trigger the previous tag on certain pages of the external website

I am not seeing any events being logged in even when I test it myself (I have authorized cookie tracking).

 

Any help would be very much appreciated
Pierre

1 Solução aceita
PCleaud
Solução
Colaborador(a)

Track custom behavioural event through Hubspot

resolver

I found the solution through the Hubspot slack developer community : the key "Name" in my code was supposed to be lowercase "name". It solved the issue for me.

Exibir solução no post original

6 Respostas 6
robertbuijs
Participante | Parceiro
Participante | Parceiro

Track custom behavioural event through Hubspot

resolver

We're experiencing exactly the same issue. Have not found the solution yet.

0 Avaliação positiva
PCleaud
Solução
Colaborador(a)

Track custom behavioural event through Hubspot

resolver

I found the solution through the Hubspot slack developer community : the key "Name" in my code was supposed to be lowercase "name". It solved the issue for me.

robertbuijs
Participante | Parceiro
Participante | Parceiro

Track custom behavioural event through Hubspot

resolver

Awesome, thanks. Turns out our mistake was using "eventName" instead of "name". Data is coming through now.

 

So the final result, if I'm correct, should be:

<script type="text/javascript">
_hsq.push(['trackCustomBehavioralEvent',{ 
  name: "lowercaseeventname",
  properties: { hs_asset_type: "landing-page",
              	hs_app_name: "NameOfOurApp"}
}
]);
</script>

 

0 Avaliação positiva
PCleaud
Colaborador(a)

Track custom behavioural event through Hubspot

resolver

Hi, me again. I would be extremely greateful if a Hubspot dev had the time to help me with this. I am seeing the right URL being called in the console and all the query parameters are passed correctly. But the event is still not registered in Hubspot 😢

Thanks

0 Avaliação positiva
PCleaud
Colaborador(a)

Track custom behavioural event through Hubspot

resolver

Hi, I am still trying to find a solution to this problem so any help would be very much appreciated. Pierre

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Track custom behavioural event through Hubspot

resolver

@Kevin-C ,, any chance you could help out here?

0 Avaliação positiva