๐ Google Tag Manager Learning Platform
Master GTM, GA4, and Event Tracking - Step by Step Guide
๐ Access Google Dashboards
Use these dashboards to set up and verify your tracking. Each card below has a direct link and step-by-step instructions.
Google Tag Manager
Create and manage your tags, triggers, and variables. This is where you configure what events to track.
Open GTM Dashboard โ- Click "Tags" โ "New" to create a GA4 Configuration tag
- Add your GA4 Measurement ID (from Google Analytics)
- Set trigger to "All Pages"
- Click "Preview" button to test your setup
- Enter this page URL:
- Click "Submit" โ "Publish" to make tags live
Google Analytics 4
View your website analytics, user behavior, and event data. See real-time events and reports.
Open GA4 Dashboard โ- Go to "Admin" (gear icon) โ "Data Streams"
- Click your web stream to get your Measurement ID (G-XXXXXXXXXX)
- Copy this ID and use it in GTM Configuration tag
- Go to "Reports" โ "Realtime" to see live events
- Go to "Admin" โ "DebugView" for detailed event debugging
Tag Assistant
Verify that your tags are firing correctly. Use this to debug and validate your GTM setup.
Open Tag Assistant โ- Click "Add domain" button
- Enter:
- Click your domain to start debugging session
- Copy the debug URL provided
- Open that URL in a new tab
- Return to Tag Assistant to see tag status
GA4 DebugView
See events in real-time with detailed parameters. Perfect for debugging event tracking issues.
Open GA4 DebugView โ- In GA4, go to "Admin" โ "DebugView" (or Reports โ DebugView)
- Enable debug mode by installing Tag Assistant Legacy extension
- OR add
?debug_mode=trueto this page URL - Click the test buttons on this page
- Watch events appear in real-time in DebugView
- Click on events to see all parameters
๐ Getting Started - 3 Simple Steps
Set Up Your Accounts
First, create your GA4 property and GTM container using the dashboard cards above. Follow the step-by-step instructions in each card.
Test Events on This Page
Click the test buttons below to send events to GTM. Open DevTools (F12) โ Console tab to see the events being sent.
Verify in GTM Preview
Go to Google Tag Manager โ Click Preview โ Enter this page URL โ Click the test buttons and watch events appear in real-time.
Test Events
Click these buttons to send events to GTM. Each button demonstrates a different type of event tracking. Open DevTools (F12) โ Console tab to see detailed event logs.
Configuration
๐ Current Configuration
GTM Container ID: GTM-WKCPQZ3G
This demo uses container ID GTM-WKCPQZ3G. In your real project, you'll create your own container in
Google Tag Manager and replace this ID.
๐ Events to Configure in GTM
button_click- Fires when "Track Button Click" is clickedpage_view- Fires automatically on page load (via GA4 Config tag)custom_event- Fires when "Send Custom Event" is clicked
๐ก Tip: See GTM_Container_and_GA4_Tags.md for detailed setup instructions.
How to Verify Events Are Working
Method 1: Browser Console
Press F12 โ Console tab. You should see messages like:
โ GTM dataLayer initialized: [...] ๐ Event pushed to dataLayer: button_click
Method 2: GTM Preview Mode
Use the Google Tag Manager dashboard card above for step-by-step instructions.
- Click the GTM dashboard link above
- Click Preview button (top right)
- Enter this page URL:
- Click Connect
- Open this page in a new tab
- Click the test buttons and watch events appear in the Preview panel
Method 3: GA4 DebugView
Use the GA4 DebugView dashboard card above for step-by-step instructions.
- Click the GA4 DebugView dashboard link above
- Navigate to Admin โ DebugView
- Enable debug mode (see instructions in the dashboard card)
- Click the test buttons on this page
- See events appear in real-time in DebugView
๐ Learning Resources & Documentation
โผ๐ Project Documentation
This project includes comprehensive guides in the docs/ folder:
- GA4_Property_Setup.md - How to create a GA4 property
- GTM_Container_and_GA4_Tags.md - How to configure GTM tags
- Tag_Assistant_Full_Guide.md - Complete Tag Assistant guide
- Google_Ads_Click_IDs_gclid_wbraid_gbraid.md - Understanding click IDs
- Google_Ads_Conversion_Demo_PHP_gtag.md - Google Ads conversion tracking
๐ Official Google Resources
- Google Tag Manager - Main GTM dashboard
- Google Analytics - Main GA4 dashboard
- GTM Quick Start Guide - Official documentation
- GA4 Setup Guide - Official documentation
- GTM Preview Mode Guide - How to use Preview
- GA4 DebugView Guide - How to use DebugView