Connect gtm datalayer event to Google Analytics
up:: Web Analytics
Custom event trigger - Tag Manager Help
- GTM - Variables
- New
- Constant - Name:
Analytics Stream Id
- You can find that under: Google Analytics - Admin - Data collection and… - Data streams
- Same string as Analytics ID
- GTM - Triggers: Create Custom Event
- ”Event name” same as
event:
in code
- ”Event name” same as
- GTM - Tags: New
- Type: GA4 Event
- Measurement ID:
Analytics Stream Id
variable - ”Event name” same as
event:
in code (might not need to be) - Triggering – select trigger you created above
Naming events
Help Google Analytics to name events like [GA4] Recommended events - Analytics Help.
Debug
Google Analytics > Admin > Data display > DebugView