Installation and configuring plug-in Google Analytics 4 (GA4) - Google Tag Manager 1. Read offical Google Documentation https://support.google.com/analytics/answer/10089681 2. The plugin uploads the all possible events to GTM. If you use the version of the plugin older 4.05 then the plugin adds the prefix 'ga4_' for all events. Example of mapping events: If you use version of the plugin 4.05 and never versions the plugin could send events without the prefix. 3. The plugin creates events with full detailed information about the product (price, category, manufacturer, etc.) dataLayer.push({ The paramater item_list_name has information about the list of items. Link them. You could see GTM ID at this page 5. How to get credentials for Measurement Protocol? Create API Secret in GA4 Navigate to GA4 and create your new API secret by navigating to Admin > Data Streams > choose your stream > Measurement Protocol > Create
The version of the plugin 4.05 and never versions have a paramater "Add/remove the prefix". You could add or remove this prefix.
We added this prefix many years ago because old UA had the same name of parameters and we wanted to split UA and GA4 events.
The prefix 'ga4_' is a legacy.
view_item => ga4_view_item
view_item_list => ga4_view_item_list
select_item => ga4_select_item
add_to_wishlist => ga4_add_to_wishlist
add_to_cart => ga4_add_to_cart
view_cart => ga4_view_cart
remove_from_cart => ga4_remove_from_cart
remove_from_wishList => ga4_remove_from_wishlist
begin_checkout => ga4_begin_checkout
add_payment_info => ga4_add_payment_info
add_shipping_info => ga4_add_shipping_info
purchase => ga4_purchase
refund => ga4_refund
'event': 'view_item_list',
'ecommerce': {
'currency': 'USD',
'items': [{
'item_name': 'Samsung Series 9 NP900X4C Premium Ultrabook',
'item_id': '6',
'price': 1590.00,
'item_brand': 'Samsung',
'item_category': 'Notebooks',
'item_list_name': 'Category page',
'productId': 6
}]
}
});
4. Create GA4 and GTM accounts.
https://analytics.google.com/analytics/web
https://tagmanager.google.com/
https://developers.google.com/analytics/devguides/collection/protocol/ga4