Lesson 1 of 4
GA4 Config + Event
① Connect your GTM container
Paste your container ID to load it into this page. It only ever runs here.
Advanced: use a specific environment
GA4 in GTM is two tags working together. One base tag (the Google tag) loads GA4 on the page exactly once and carries your Measurement ID. From then on, each thing you want to measure is a separate GA4 Event tag that fires on its own trigger and sends just that event by name.
The button below pushes a sign_up event with a method of google or email. Your job is the base tag that loads GA4 plus a GA4 Event tag that catches sign_up and forwards the method along with it, so you can see in GA4 how people signed up.
Goal
Load GA4 with a base tag, then fire a GA4 Event tag for sign_up that maps the method parameter.
Build it in GTM
Store the Measurement ID in a Constant
Go to Variables, and under User-Defined Variables click New and choose Constant. Paste your GA4 Measurement ID (it looks likeG-XXXXXXXXXX), name itGA4 Measurement IDand Save. Now the base tag and every event tag can reference{{GA4 Measurement ID}}instead of hard-coding the ID, so they always agree.Build the GA4 base tag (Google tag)
Go to Tags → New and choose Google Tag. In the Tag ID field, reference your{{GA4 Measurement ID}}constant. Set it to fire on Initialization - All Pages so GA4 loads once, early, before any event tags. Name it something clear likeGoogle Tag - GA4and Save.Create the Custom Event trigger for sign_up
Go to Triggers → New and choose Custom Event. In Event name typesign_up, it must match the pushed string exactly, including the underscore. This trigger fires whenever the page pushes that event.Fire a GA4 Event tag that maps method
Create a GA4 Event tag, point its Measurement ID at{{GA4 Measurement ID}}, and set Event Name tosign_up. Under Event Parameters, add a parameter namedmethodwith value{{DLV - method}}(a Data Layer Variable readingmethod). Fire it on yoursign_uptrigger. For practice you can substitute a Custom HTML tag namedCustom HTML - Testwith<script></script>, but the GA4 Event tag is the real-site choice.
Debug in Tag Assistant
Copy this lesson's live URL and paste it into GTM Preview, that is the page Tag Assistant connects to. It has the clickable elements, so this page stays clean for reading.
- In your GTM, click Preview.
- Paste the live URL above and click Connect.
- Interact with the live page and watch your tag fire in Tag Assistant.
What you should expect to see
sign_up event appears in the left rail, your GA4 Event tag shows under Tags Fired, and the outgoing hit carries method set to the option you picked.Verify your container
Built it? Export your container, Admin → Export Container, choose your workspace, then drop the JSON here to check it against this lesson.
Drop your container .json here
or browse · checked in your browser, nothing is uploaded