dataLayer Sandbox

This page is used to experiment with the dataLayer and the default hits required for a Google Analytics 4 implementation. We use it mainly for educational purposes, like our Technical Deep-Dive course for Google Analytics 4 together with Krista Seiden.

If you are looking for the Consent Management Platform page, please click here.

dataLayer Initialization

In this section you can configure the dataLayer that you want to be present when you refresh this page. By default it's empty, but you can change that.

Configure Initialization

This allows you to define what the dataLayer should look like when you refresh this page. Fill it out, save it, and once you refresh, these values will be in the dataLayer upon reload.

Initialization

dataLayer Pushes

All the forms below execute a dataLayer.push for the contained text. By default, the page is filled with the most common Google Analytics 4 Events, but you can change them all.

Custom Event

custom_event

Product Views and Interactions

View item list

view_item_list

Select Item

select_item

View item

view_item

Internal Promotions

View Promotion

view_promotion

Select Promotion

select_promotion

Shopping Cart Interactions

Add to Wishlist

add_to_wishlist

Add to Cart

add_to_cart

View Cart

view_cart

Remove from Cart

remove_from_cart

Checkout Funnel

Begin Checkout

begin_checkout

Add Shipping Information

add_shipping_information

Add Payment Info

add_payment_info

Purchase

Purchase (Transaction)

purchase

Refunds

Full Refund

refund

Partial Refund

refund