Lesson 12 of 16
Promotions
① Connect your GTM container
Paste your container ID to load it into this page. It only ever runs here.
Advanced: use a specific environment
Internal promotions, the banners and offers you place on your own site, get their own GA4 events. view_promotion fires when a shopper sees a banner, and select_promotion fires when they click it, so you can measure which creative actually drives clicks.
Both push an ecommerce object carrying the promotion_id and the creative_slot the banner sits in. You wire a Custom Event trigger and a GA4 Event tag for each so those promotion details reach GA4.
Goal
Fire Custom Event triggers and GA4 Event tags on view_promotion and select_promotion, carrying promotion_id and creative_slot.
Build it in GTM
Know what the page pushes
The banner pushes{ event: "view_promotion", ecommerce: { items: [{ promotion_id, creative_slot, ... }] } }when seen andselect_promotionwith the same shape when clicked. GTM sees two events, each carrying the promotion details.Create a Custom Event trigger for each
Triggers → New → Custom Event forview_promotionand again forselect_promotion. Each event name must match the pushed string exactly.Fire a GA4 Event tag on each
Build a GA4 Event tag per event, reading theecommerceobject sopromotion_idandcreative_slottravel with it, and set the matching trigger as its firing trigger. The course'sCustom HTML - Teststand-in with<script></script>is an accepted placeholder.
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
view_promotion and select_promotion appear in the left rail, and each GA4 Event tag shows under Tags Fired with promotion_id and creative_slot populated.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