• Créditos da HubSpot: Desbloqueie ferramentas poderosas para o crescimento

    Dúvidas?

CMS Development

CHutt5
Membro

Track HubSpot Pop Up Forms in Tag Manager

Hi,

 

I'm trying to track hubspot pop up forms in Google Tag Manager but GTm but not having any luck.

 

I have the listener script setup below.

 

<script type="text/javascript">
  window.addEventListener("message", function(event) {
    if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmitted') {
      window.dataLayer.push({
        'event': 'hubspot-form-submit',
        'hs-form-guid': event.data.id
      });
    }
  });
</script>

 

I tried setting the trigger to when the pop up is visible (using element visibility trigger) but that also didn't seem to work.

 

Any help is appreciated.

0 Avaliação positiva
2 Respostas 2
Jaycee_Lewis
Gerente da Comunidade
Gerente da Comunidade

Track HubSpot Pop Up Forms in Tag Manager

Hi, @CHutt5 👋 Thanks for your question. Did you get this resolved? If not, I'll be happy to tag some community members who have GTM expertise.

 

Best,

Jaycee





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Avaliação positiva
CHutt5
Membro

Track HubSpot Pop Up Forms in Tag Manager

Hi @Jaycee_Lewis,

 

Thanks for your response,

 

Unfortunately not, still looking for a solution.

 

That would be great, thanks.

0 Avaliação positiva