• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Event triggers for GA4?

New Here ,
Aug 13, 2023 Aug 13, 2023

Copy link to clipboard


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!






Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation