Skip to main content
Participant
August 13, 2023
Question

Event triggers for GA4?

  • August 13, 2023
  • 0 replies
  • 78 views

Hello all, 

Does anyone know how to integrate Google Analytics 4 events in the javascript code for an animate html5 canvas game?

 

With Universal Analytics, I was able to use a code like "ga('send', 'event', 'Draw', 'ASAD');" within my actions javascript (while also pasting the GA4 code in the header of the html file) to trigger an event. Now with GA4, I have tried using the new format of "gtag('event', 'draw' , { 'gameType' : 'ASAD'});" but I get no event trigger. 

 

All other events on my website are working fine (including the pageview event from the game's html page loading), but there is nothing being reported in my animate games' javascript.

 

Can anyone help me out here?

Thank you!

    This topic has been closed for replies.