Solved

Triggering a custom Heap event through Google Tag Manager

  • 7 March 2022
  • 1 reply
  • 311 views

Userlevel 1
Badge +1

Has anyone tried triggering a custom Heap event through Google Tag Manager? We’re trying to debug a trigger built in GTM and we’re thinking maybe we can have the GTM fire off a custom Heap event and then use Heap to debug which users it appears on.

icon

Best answer by jonathan 15 March 2022, 01:35

View original

1 reply

Userlevel 5
Badge +3

@tlane Great question. You can fire a track API call from GTM by adding a Custom HTML tag to fire on the problem trigger:

<script type="text/javascript">

heap.track('Debugging Event')

</script>

The event will be attached to the relevant user and get the usual web properties such as Domain and Path to help you narrow down the problem. 

https://developers.heap.io/reference/track

Hope this helps!

Reply