Learn business growth with Google Analytics 4 Forums Google Analytics 4 Trouble Tracking Events in GA4 When Using Tag Manager Reply To: Trouble Tracking Events in GA4 When Using Tag Manager

  • Gabriel

    Member
    14 March 2023 at 4:10 am

    Yes, it is possible to get gtag('event', ...) calls on the same footing with GA as if gtag('config', ...) has been called. The key lies in proper GTM configuration – you need to ensure the GA4 configuration tag runs on all pages before anything else so it can set up the necessary framework. This problem essentially stems from sequencing since every tag in GTM is run asynchronously or simultaneously. If GTM has not finished instantiating the GA4 config before the gtag('event', ...) call is made, the command will fail.

    As for setting up a GTA trigger/tag that tosses raw data straight to GA4, yes, you can do that too. GTM provides custom event triggers that could be used to send raw data to GA4 with a custom event tag. This requires a good understanding of the Event Builder in GA4, which allows you to create events based on user interactions and send them to GA4 via GTM.