Google Tag Manager (GTM)
In this article, you'll learn what you need to know about using Google Tag Manager (GTM) with e-guma.
In this article
Linking Google Tag Manager with e-guma
You can link your Google Tag Manager account with e-guma. In e-guma select Settings -> Online shop -> Basic settings. Activate the field Google Tag Manager and enter your Container-ID. All Google Tag Manager Container-ID start with GTM-.
In this article by Google, you'll learn where to find your Container-ID in your Google Tag Manager account. Once you have linked e-guma with your Google Tag Manager, you can start adding tags in Google Tag Manager.
You can enter both the Google Analytics Measurement-ID and the Container-ID from Google Tag Manager. However, when using Google Tag Manager, we recommend that you integrate Google Analytics into Google Tag Manager and only enter the Container-ID from Google Tag Manager into your e-guma Backoffice. If you enter both IDs in e-guma, Google Analytics must not be integrated in the Tag Manager. This would otherwise lead to double counting. More information on Google Analytics you will find here.
Set up a GA4 tag

In the Triggers area, add a trigger of the Page Views type and activate All Page Views.
When Google Tag Manager is integrated into e-guma, Google's standard code snippet for page views is included on every page.
E-Commerce-Tracking
The data in the e-commerce section of Google Analytics can be delayed by a few hours up to days. More info
It is also possible to record the vouchers/ticket/product sales in your online shop. Before you can use this function, you have to set up a according tag in Google Tag Manager.

Activate the option Send e-commerce data under Additional settings > E-Commerce. Use DataLayer as the data source.
In the Trigger area, add a trigger of the Custom event type and use the following event name:
^(view_item|view_item_list|select_item|add_to_cart|remove_from_cart|view_cart|begin_checkout|add_payment_info|add_shipping_info|purchase)$
<script type="text/plain" data-cookiecategory="analytics"> dataLayer = []; dataLayer.push({ 'event': 'purchase', 'ecommerce': { 'transaction_id': 'VOUCHER G10004', 'affiliation' : 'e-guma', 'value': 20, 'currency': 'CHF', 'items': [ { 'item_name': 'Wertgutschein (Gutschein)', 'item_id': '35f5d3ef-c6ab-43fc-9931-4ba7843dd938', 'price': 20, 'item_category': 'Gutschein', 'quantity': 1, ยจ } ] } }); </script> ] } }); </script>
More details can be found in the Google Tag Manager user guide on e-commerce information.
Restrictions
Please note the following restrictions for e-commerce tracking:
- For now, only the
purchase
event is supported by e-guma and is triggered out in the data layer. - Other events such as
view_item_list
,view_item
,add_to_cart
,view_cart
are not yet integrated. Implementation is planned. - If needed, you can manually add other events in the Google Tag Manager.
No data will be sent to Google Analytics during the project phase. (The project phase ends upon go live),