Lesson 13 of 16
Add To Wishlist
① Connect your GTM container
Paste your container ID to load it into this page. It only ever runs here.
Advanced: use a specific environment
Not every signal of intent is a sale. When a shopper saves a product, GA4's add_to_wishlist event captures that demand, useful for restock alerts, gift campaigns and spotting items people want before they buy.
The push carries the same ecommerce shape as the rest of the funnel: currency, value and an items array. You build the Custom Event trigger and the GA4 Event tag that reads it.
Goal
Fire a GA4 Event tag on add_to_wishlist, reading the ecommerce object (currency, value and items).
Build it in GTM
Know what the page pushes
Saving the product runs{ event: "add_to_wishlist", ecommerce: { currency, value, items } }. GTM sees an event namedadd_to_wishlistwith the product nested underecommerce.Create the Custom Event trigger
Triggers → New → Custom Event, event nameadd_to_wishlist. It must match the pushed string exactly.Fire a GA4 Event tag on it
Build a GA4 Event tag namedadd_to_wishlistthat reads theecommerceobject (mapvalue,currencyand theitemsarray), and set the trigger above 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
add_to_wishlist event appears in the left rail, and your GA4 Event tag shows under Tags Fired with the value and items 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