Connect gtm datalayer event to Google Analytics

Custom event trigger - Tag Manager Help

  1. GTM - Variables
    1. New
    2. Constant - Name: Analytics Stream Id
      • You can find that under: Google Analytics - Admin - Data collection and… - Data streams
    3. Same string as Analytics ID
  2. GTM - Triggers: Create Custom Event
    • ”Event name” same as event: in code
  3. GTM - Tags: New
    1. Type: GA4 Event
    2. Measurement ID: Analytics Stream Id variable
    3. ”Event name” same as event: in code (might not need to be)
    4. Triggering – select trigger you created above

Naming events

Help Google Analytics to name events like [GA4] Recommended events - Analytics Help.