Before You Begin
Google Tag Manager and GA4 accounts
You will need to get your site's Container ID from Google Tag Manager. Before you start, your Tag Manager and GA4 accounts should be ready.
Set CMS Analytics to GA4
Head to your Google tag manager (https://tagmanager.google.com/)
Click on the corresponding account
Head to Triggers and create the following, alternatively, you can limit what you track by entering exact event names in the regex field “add_payment_info|add_shipping_info|add_to_cart|add_to_wishlist|begin_checkout|purchase|refund|remove_from_cart|select_item|select_promotion|view_cart|view_item|view_item_list|view_promotion"
Head to tags and create the following to track ecommerce events (but with your tag id, the one with the format “G-XXXXXX” that you copied from google analytics)
Create one more tag with the following to track all basic actions (but with your tag id, the one with the format “G-XXXXXX” that you copied from google analytics, yes the same as the one from the previous step)
Hit submit and follow the prompts to publish the changes
Related Resources