APIs & Integrations

PCleaud
Colaborador

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 Soluciones aceptada
PCleaud
Solución
Colaborador

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.

Ver la solución en mensaje original publicado

6 Respuestas 6
robertbuijs
Participante | Partner
Participante | Partner

Track custom behavioural event through Hubspot

resolver

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

0 Me gusta
PCleaud
Solución
Colaborador

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 | Partner
Participante | Partner

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 Me gusta
PCleaud
Colaborador

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 Me gusta
PCleaud
Colaborador

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 Me gusta
dennisedson
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Track custom behavioural event through Hubspot

resolver

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

0 Me gusta