How to Set Up GA4 Events in Google Tag Manager for Odoo

Track Website Activity in GA4 with Google Tag Manager
Accurately tracking how your customers interact with your website can give you valuable insight into product interest, checkout behavior, searches, logins, and other important actions.
If your website is already sending event information to the data layer, the next step is to configure Google Tag Manager (GTM) so that information is forwarded to Google Analytics 4 (GA4).
This guide explains how to configure GTM to track ecommerce events, custom website interactions, searches, and customer logins in GA4.
Set Up Your Google Tag First
Before creating GA4 Event tags, make sure your GTM container already has a Google Tag connected to your GA4 property.
Open your existing tags and look for a tag with:
Tag Type: Google Tag
and a Tag ID that matches your GA4 Measurement ID:
G-XXXXXXXXXX
If the Google Tag already exists, you do not need to create another one. Make note of the tag name because you will use it when configuring your GA4 Event tags.
If one has not yet been created, configure a new tag with:
Tag Name: Google Tag - G-XXXXXXXXXX
Tag Type: Google Tag
Tag ID: G-XXXXXXXXXX
Triggering: All Pages
Replace G-XXXXXXXXXX with your actual GA4 Measurement ID.
This Google Tag acts as the connection between your website’s GTM container and your GA4 property.
Set Up Ecommerce Events in GTM
Your ecommerce events allow GA4 to receive information about how customers interact with products and move through your purchasing process.
Examples include viewing products, adding products to the cart, beginning checkout, completing purchases, and requesting refunds.
Create the Ecommerce Data Layer Variables
In Google Tag Manager, create a new Data Layer Variable for each of the following values:
| GTM Variable Name | Data Layer Variable Name |
|---|---|
| DLV - ecommerce.coupon | ecommerce.coupon |
| DLV - ecommerce.currency | ecommerce.currency |
| DLV - ecommerce.item_list_id | ecommerce.item_list_id |
| DLV - ecommerce.item_list_name | ecommerce.item_list_name |
| DLV - ecommerce.items | ecommerce.items |
| DLV - ecommerce.shipping | ecommerce.shipping |
| DLV - ecommerce.tax | ecommerce.tax |
| DLV - ecommerce.transaction_id | ecommerce.transaction_id |
| DLV - ecommerce.value | ecommerce.value |
These variables make the ecommerce information available inside GTM when your website sends it to the data layer.
Create the Ecommerce Event Trigger
Create a new trigger with the following configuration:
Trigger Name: Ecommerce Events (Regex)
Trigger Type: Custom Event
For the Event Name, enter:
^(view_item|view_item_list|select_item|add_to_cart|remove_from_cart|view_cart|begin_checkout|add_shipping_info|add_payment_info|purchase|refund|view_promotion|select_promotion)$
Enable:
Use regex matching
Set the trigger to fire on:
All Custom Events
Using one regex trigger allows the same GA4 tag to respond to multiple supported ecommerce events instead of requiring a separate trigger for every event.
Create the GA4 Ecommerce Tag
Create a new tag with the following configuration:
Tag Name: GA4 - Ecommerce Events
Tag Type: Google Analytics: GA4 Event
For the Configuration Tag, select the Google Tag you created or identified earlier.
For the Event Name, use:
{{Event}}
Under More Settings, enable:
Send Ecommerce data
Set the data source to:
Data Layer
This allows the standard ecommerce information already present in the data layer—such as items, value, currency, shipping, and other ecommerce details—to be forwarded to GA4 without manually mapping each field as an individual event parameter.
For Triggering, select:
Ecommerce Events (Regex)
Your ecommerce events can now be sent from GTM to GA4 when the corresponding event is pushed to the website data layer.
Track Custom Website Events
In addition to standard ecommerce actions, your website may send custom events representing other important customer interactions.
The documented setup supports events including:
shipping_addressbilling_addressaddress_validationpayment_methodenter_couponremove_couponenter_client_order_refenter_customer_message
These events can give you additional visibility into what customers are doing during checkout and other website workflows.
Create the Custom Event Data Layer Variables
Create the following variables in GTM using the Data Layer Variable type:
| GTM Variable Name | Data Layer Variable Name |
|---|---|
| DLV - interaction | interaction |
| DLV - type | type |
Not every custom event will provide an interaction or type value.
If one of these variables is undefined for a particular event, that is acceptable.
Create the Custom Events Trigger
Create a new trigger with:
Trigger Name: Custom Events (Regex)
Trigger Type: Custom Event
For the Event Name, enter:
^(shipping_address|billing_address|address_validation|payment_method|enter_coupon|remove_coupon|enter_client_order_ref|enter_customer_message)$
Enable:
Use regex matching
Set the trigger to fire on:
All Custom Events
This allows one trigger to listen for all of the supported custom website interactions.
Create the GA4 Custom Events Tag
Create a new tag with:
Tag Name: GA4 - Custom Events
Tag Type: Google Analytics: GA4 Event
For Configuration Tag, select your Google Tag.
Set Event Name to:
{{Event}}
Add the following event parameters:
| Event Parameter | Value |
|---|---|
| interaction | {{DLV - interaction}} |
| type | {{DLV - type}} |
For Triggering, select:
Custom Events (Regex)
When one of the supported custom events occurs, GTM can now send the event name and applicable interaction details to your GA4 property.
Track Website Search Events
Tracking searches can help you understand what your customers are actively looking for on your website.
This can be useful when evaluating:
- Product demand
- Catalog gaps
- Common terminology
- Navigation behavior
- Customer interest in specific products or categories
Create the Search Term Variable
Create a Data Layer Variable with:
Variable Name: DLV - search_term
Data Layer Variable Name: search_term
Create the Search Trigger
Create a new Custom Event trigger with:
Trigger Name: Search
Event Name: search
Create the GA4 Search Tag
Create a new tag with:
Tag Name: GA4 - Search
Tag Type: Google Analytics: GA4 Event
Configuration Tag: Your Google Tag
Event Name: search
Add the following event parameter:
| Event Parameter | Value |
|---|---|
| search_term | {{DLV - search_term}} |
Set the tag’s trigger to:
Search
When your website sends a search event to the data layer, GTM can now forward the search term to GA4.
Track Customer Login Events
You can also track when customers log in to your website and, when available, the method they used.
Create the Login Method Variable
Create a Data Layer Variable with:
Variable Name: DLV - method
Data Layer Variable Name: method
Create the Login Trigger
Create a Custom Event trigger with:
Trigger Name: Login
Event Name: login
Create the GA4 Login Tag
Create a new tag with:
Tag Name: GA4 - Login
Tag Type: Google Analytics: GA4 Event
Configuration Tag: Your Google Tag
Event Name: login
Add the following event parameter:
| Event Parameter | Value |
|---|---|
| method | {{DLV - method}} |
Set the trigger to:
Login
When your website sends the login event, GTM can now send the login event and method information to GA4.
Bring Your Website Event Data into GA4
Once these tags, triggers, and variables are configured, Google Tag Manager can act as the connection between the event information generated by your website and your GA4 property.
With this setup, you can track activity such as:
- Product views
- Product list interactions
- Add-to-cart and remove-from-cart activity
- Cart views
- Checkout progression
- Shipping and payment information
- Purchases and refunds
- Promotions
- Address interactions
- Coupon activity
- Customer order references
- Customer messages
- Website searches
- Customer logins
This gives you a more complete view of how your customers interact with your website and purchasing process, allowing you to use GA4 reporting to better understand customer behavior and ecommerce activity.
For businesses using Steersman’s Odoo website functionality, this setup allows the event data generated by your website to be passed through Google Tag Manager and into GA4 for reporting and analysis.
To learn about GA4 for website chat CLICK HERE
Related posts

Importing bulk data into Odoo using S3 fast load setup
This guide will walk you through creating importable files and getting them picked up for load into your Odoo database hosted by Steersman.

How to Use Dynamic Formula Expressions in Steersman's Dynamic BoMs
Our Dynamic BoM customization uses condition statements to determine when a component or rule should apply to your configured product. This guide explains how to write reliable Dynamic BoM conditions, including how to compare configuration values, combine multiple requirements, group `and` and `or` logic, and avoid common formatting mistakes.

How do Odoo E-Commerce Sites from Steersman Rank?
Odoo e-commerce sites from Steersman will get you the best performance, structure, and SEO in the world. See the ratings for yourself.

Odoo E-Commerce Websites List
This curated list highlights some of the best online stores that run on Odoo. See how Steersman e-commerce solutions stack up against the competition.