This guide is applicable if you have set up your store to use Google Tag Manager (GTM) by adding your Container ID in the Tracking Codes section of Giftpro admin and are then using GTM to add Google Analytics tracking to your store pages. It will explain how to pass Ecommerce data from Giftpro to GTM so it can be sent to your Google Analytics account.
The final configuration in GTM should consist of 2 tags - a Google Tag that fires on all pages, and an event tag that uses the Data Layer to access ecommerce data and is fired by a number of custom events.
Google Tag
A Google Tag should be created that loads your Google Analytics Measurement ID. The firing trigger for this tag should be 'Consent Initialisation'
GA4 Event tag
A GA4 Event tag should be created using the your same GA4 Measurement ID and uses the built in variable name {{Event}}. Under More settings enable the option to Send Ecommerce data with Data Layer set as the Data source. Your Giftpro store is set up to pass all required ecommerce data automatically as per the official GA4 guidelines so you don't need to access dataLayer variables directly. For more reference on the exact structure of the Data Layer please refer to Google documentation. The triggers for this tag are detailed below.
This single GA4 Event tag can pass data for a number of different events that are triggered by your Giftpro store. To achieve this, you can create a Custom Event trigger for each events that is sent to Google by your store.
Your Giftpro store will pass the following Google Analytics events:
view_item_list
select_content
select_item
view_item
add_to_cart
begin_checkout
add_payment_info
checkout_progress
purchase
Please refer to the official GA4 documentation for any further information about these events.
Create a new Custom Event and for the Event name you can include all of the potential event names mentioned above in one field by entering the following line of text and ticking 'Use regex matching'
view_item_list|select_content|select_item|view_item|add_to_cart|begin_checkout|add_payment_info|checkout_progress|purchase
Once you have added the trigger you should have a GA4 Event tag that will pass all available Ecommerce data to your GA4 account.