Overview
The Odoo Google Analytics 4 eCommerce module simplifies and automates the integration between your Odoo eCommerce website and Google Analytics. The solution accurately sends all key eCommerce events, from product views and add-to-cart actions to successful purchases and payments. As a result, businesses receive a ready-to-use sales monitoring tool without the need to configure complex tracking code on the website manually.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
|---|---|
| Compatibility |
Community
Enterprise
|
| Technical Name | website_sale_google_analytics_4 |
| Version | 19.0.1.1.0 |
| License | OPL-1 |
| Category | |
| Support | Free 60 days support and 360 days bug-fixing |
Use Case
Jorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Forem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Dorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.
It is a long established fact that a reader will be distracted by the readable content of a page
Korem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Korem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis.
Odoo App Installation
Upload modules
Upload modules from the ZIP archive to your Odoo hosting, or a GitHub repository connected there.
Place the unzipped modules in your custom add-on directory and restart the Odoo system service.
Update App List
After restarting, activate the Developer Mode, and go to the Apps menu.
Click on Update Apps List to fetch the new modules in the list.
Activate the App
Install the new module, finding it by name and clicking on the Activate button.
* If you don't see the module, try to remove the default Apps filter from the search bar.
Configuration
Follow the instructions in the module description to complete the installation process and start using the app.
Manual
Activation
After installing the app, go to the website settings and, in the Enhanced Website Tracking section, enable the Activate Tracking option. To test your website tracking and view tracked events in the browser console, also temporarily activate the Debug Logging feature:
Cookie Consent
The module is compatible with the Odoo Google Consent Mode solution, which allows managing cookie consent and updating consent states by sending them to Google.
Configuration
Adding a Tracking Service
Go to the Website - Configuration - Tracking - Services menu and click New to add a new tracking service.
Firstly, fill in the following fields in the new tracking service:
- Specify a Website (if using multiple websites)
- Select the service Type as Google Analytics 4
- Paste your GA4 Measurement ID into the Key field
Then, specify the type of identifier for the products and which product category is provided to Google:
If products have attributes and variants, choose Product Variant ID in the Item Type field; otherwise, select Product Template ID.
Select the desired Category Type: an eCommerce Public Category or an internal Product Category.
The next option is the Lead Value on the Options tab.
This field represents the monetary value of a lead generation, based on estimated evaluations.
Tracking Logs
The module includes an internal logging feature. To activate it, enable the Internal Logs option.
To view logs, go to the Website - Configuration - Tracking - Logs menu or click the Logs button at the top of the form.
The list of internal tracking events.
User-provided Data
Enhanced conversions help optimize your advertisements by providing Google with additional user data. Open the Advanced Matching tab and click Allow Enhanced Conversions, which enables all available options for this tracking service.
Review the options and leave enabled the user-provided data that should be sent to Google.
Use the Sale Order Partner value as the Customer Data Source because it provides more user information when guest checkouts are allowed without registration.
Advanced Settings
The module includes additional settings available in Developer Mode.
Product Identifier
The module uses the Product ID field as a unique product identifier. To use a different value, specify another product field containing the desired identifier on the Technical tab:
Purchase on Portal
To track portal purchases, enable the Track Purchase on Portal option:
Exclude Delivery
The next available setting for tracking services is Exclude Delivery. When enabled, the service excludes delivery lines from sales orders in tracking data transmissions:
Exclude Rewards
To exclude reward order lines from tracking data, enable the Exclude Reward option:
Add to Cart
By default, the module tracks the actual addition of a product to the cart. To track the event upon clicking the button without waiting for the actual addition to the cart, perform the following steps:
- Navigate to Website — Configuration — Websites
- Open the website on the Enhanced Tracking tab
- Enable the Add to Cart on Click option
Purchase
To track purchases only after a successful payment transaction, enable the Track Confirmed Purchases only option:
If business logic considers an order with a Pending payment status as a purchase, enable the Track Pending Purchases too option as well.
Google First-party Mode
Google First-party Mode allows configuring Google tags on your Odoo website to load scripts from your tagging servers or CDN instead of Google's:
The app allows specifying a custom URL for Google Tag Serving. Open the website settings and, in the Tracking and SEO section, change the Tag Serving URL:
After saving the settings, sign out of Odoo and open the page source of your website to review the result:
To restore the default Google tag URL, click the button on the right:
Testing
To test your Google Analytics 4 script, use the Debug Mode feature. Enable this option in your GA4 tracking service options:
Now open Google Analytics 4, go to the Admin menu, and in the Data display section, open DebugView. All tracking events from your website appear in this window in near real time:
Add-ons
You can extend the Odoo Google Analytics 4 eCommerce module with solutions tailored to your business goals and the specific Google services you use:
- Odoo Google Tag Manager Enhanced Conversions
- Odoo Google Ads Conversion Tracking
- Odoo Google Analytics Measurement Protocol
Google Tag Manager Enhanced Conversions
Use this module if you manage tags via Google Tag Manager. It allows you to use a single DataLayer for Google Ads, Google Analytics, Meta, Microsoft Ads, and other platforms that support GTM.
Google Ads Conversion Tracking
Choose this module if you need to set up Google Ads conversion tracking without using Google Tag Manager. It integrates directly via Google Tag and supports Enhanced Conversions.
Google Analytics Measurement Protocol
Use this module to send events to Google Analytics 4 directly from the Odoo server. Server-side tracking minimizes data loss from ad blockers, JavaScript errors, or premature page closures while enabling you to track server-side business events.
App Edition Comparison
|
Choose the edition that best fits your business needs |
Global Site Tag (gtag.js) is now the Google Tag
|
Google Analytics 4 eCommerce
|
GA Measurement Protocol
|
|---|---|---|---|
website_google_analytics_4
|
website_sale_google_analytics_4
|
website_sale_google_analytics_api
|
|
|
Adding a Tag to All Webpages
|
|
|
|
|
Page View Event Tracking
|
|
|
|
|
Support for Google Consent Mode
|
|
|
|
|
eCommerce Event Tracking
|
|
|
|
|
Sending Product Data
|
|
|
|
|
Sending User-Provided Data
|
|
|
|
|
Sending Data When the Script Tag is Blocked
|
|
|
|
|
Server-side Integration Via the Measurement Protocol
|
|
|
|
|
Full Price
|
0.0
€
|
130.0
€
|
245.0
€
|
|
Upgrade Price
|
|
|
115.0
€
|
Changelog
14.0.2.2.0 2024-03-19
- Add compatibility with the Google Consent Mode module.
14.0.2.1.0 2024-02-06
- Improve the GA4 identifier generation.
14.0.2.0.1 2023-08-05
- Fix inheritance of the method "get_data_for_purchase".
14.0.2.0.0 2023-06-15
14.0.1.5.4 2023-02-03
- Fix the GA4 event parameter.
14.0.1.5.3 2022-12-07
- Add ability to skip some products.
14.0.1.5.2 2022-11-02
- Improve "purchase" event.
- Improve GA4 user reference generation.
14.0.1.5.1 2022-10-18
- Add gtag.js params method.
14.0.1.5.0 2022-10-12
- Add ability to specify the GA4 config ID.
- Fix the "purchase" event data.
14.0.1.4.0 2022-09-15
- Add Google Analytics User ID Feature.
14.0.1.3.0 2022-09-02
- Add the "add_payment_info" event.
- Add the "add_shipping_info" event.
14.0.1.2.0 2022-08-24
- Move the "add_to_cart" logic to JS.
14.0.1.1.0 2022-08-13
- Improve script running when webpage is loaded.
- Improve the "add_to_cart" event firing logic.
14.0.1.0.2 2022-08-12
- Improve multiply "onclick" element adding.
14.0.1.0.1 2022-07-29
- Fix the "AddToCart" event function for logged users.
14.0.1.0.0 2021-06-03
- Init version.
15.0.3.3.0 2024-04-04
- Implement Google Consent Mode compatibility.
- Add a compatibility for Google Tag scripts.
15.0.3.2.1 2024-03-19
- Fix templates naming.
15.0.3.2.0 2024-03-18
- Add compatibility with the Google Consent Mode module.
15.0.3.1.0 2024-02-07
- Improve the GA4 identifier generation.
- Make a lead value common for the service.
15.0.3.0.1 2023-08-05
- Fix inheritance of the method "get_data_for_purchase".
15.0.3.0.0 2023-07-27
- Implement a new generation of website tracking logic.
15.0.2.1.3 2023-02-03
- Fix the GA4 event parameter.
15.0.2.1.2 2022-11-11
- Refactoring GA4 user reference method.
15.0.2.1.1 2022-11-03
- Improve the method to get GA4 data.
15.0.2.1.0 2022-09-15
- Add Google Analytics User ID Feature.
15.0.2.0.0 2022-09-08
- Extend the standard e-commerce tracking logic.
- Add product category type selection.
15.0.1.0.1 2022-06-02
- Fix the "AddToCart" event function for logged users.
15.0.1.0.0 2022-02-05
- Migrate from 14.0
16.0.2.4.3 2024-10-23
- Improve the logic to check available user tracking fields to activate.
16.0.2.4.2 2024-10-18
- Add an option to hash the "Street" user data.
- Refactor a logic to check available user tracking fields to activate.
16.0.2.4.1 2024-07-20
- Add the "First Name" and "Last Name" to a user data enhanced matching.
16.0.2.4.0 2024-07-17
- Add compatibility for enhanced conversions.
- Improve an user data processing.
16.0.2.3.1 2024-04-04
- Improve the Google consent calls for different Google Tags.
16.0.2.3.0 2024-04-02
- Implement Google Consent Mode compatibility.
- Add a compatibility for Google Tag scripts.
16.0.2.2.1 2024-02-24
- Improve getting product data from the product list.
16.0.2.2.0 2024-02-10
- Implement integration with the standard Odoo Cookies Bar.
- Implement the Google cookie consent management.
16.0.2.1.2 2024-02-10
- Improve the GA4 identifier generation.
- Fix inheritance for the "get_data_for_purchase" method.
16.0.2.1.1 2023-12-22
- Add README.rst.
- Fix linter warnings.
16.0.2.1.0 2023-11-15
- Remove the field "GA4 Lead Value" and start using the base field "Lead Value".
16.0.2.0.0 2023-07-27
- Implement a new generation of website tracking logic.
16.0.1.2.0 2023-04-07
- Improve the GA4 param "price" for product prices with discounts
16.0.1.1.1 2023-02-03
- Fix the GA4 event parameter.
16.0.1.1.0 2023-01-14
- Improve firing logic of the events "begin_checkout", "add_shipping_info", "add_payment_info".
16.0.1.0.0 2022-11-11
- Migration from 15.0.
17.0.1.3.7 2026-05-25
- Improve getting of the list of allowed settings for user data.
- Refactor methods to process order and product data.
17.0.1.3.6 2025-10-03
- Improve the Lead tracking data.
17.0.1.3.5 2024-10-23
- Improve the logic to check available user tracking fields to activate.
- Add an option to hash the "Street" user data.
17.0.1.3.4 2024-08-30
- Add the "First Name" and "Last Name" to a user data enhanced matching.
17.0.1.3.3 2024-08-20
- Add the "currency" param to the top level of tracking data.
17.0.1.3.2 2024-07-17
- Improve the enhanced conversions logic.
- Improve views.
17.0.1.3.1 2024-07-05
- Fix the "GA4 Debug Mode" option visibility.
17.0.1.3.0 2024-06-20
- Add compatibility for enhanced conversions.
- Improve an user data processing.
17.0.1.2.0 2024-04-09
- Implement Google Consent Mode compatibility.
- Add a compatibility for Google Tag scripts.
17.0.1.1.0 2024-02-24
17.0.1.0.1 2024-02-10
- Fix the method "get_data_for_purchase" inheritance.
- Fix generating of GA4 external IDs for portal users.
17.0.1.0.0 2023-11-03
- Migration from 16.0.
18.0.1.2.7 2026-05-25
- Improve getting of the list of allowed settings for user data.
- Refactor methods to process order and product data.
18.0.1.2.6 2026-04-20
- Implement option to skip reward lines when preparing tracking data from sale order.
18.0.1.2.5 2026-01-07
- Add the "shipping" tracking parameter for the Purchase event.
18.0.1.2.4 2025-11-19
- Improve the Google Tag serving URL logic for multiple company environment.
18.0.1.2.3 2025-10-12
- Implement the option to exclude from tracking delivery lines from sale orders.
- Add tracking for the Remove from Cart event.
18.0.1.2.2 2025-10-08
- Implement the option to specify different product identifiers instead of the product "id".
18.0.1.2.1 2025-10-03
- Fix view inheritance.
18.0.1.2.0 2025-05-29
- Implement the Google First-party Mode to modify the serving URL and load Google scripts from own servers.
18.0.1.1.0 2025-01-14
- Improve the logic to check available user tracking fields to activate.
- Add an option to hash the "Street" user data.
18.0.1.0.0 2024-10-11
- Migration from 17.0.
19.0.1.1.0 2026-05-21
- Implement user-provided data collection for the first-party GA4 data.
- Add the "view_cart" tracking event.
19.0.1.0.5 2026-04-20
- Add option to skip reward lines when preparing tracking data from sale order.
19.0.1.0.4 2026-02-18
- Fix string value formatting.
19.0.1.0.3 2026-02-03
- Add the "shipping" tracking parameter for the Purchase event.
- Improve the Google Tag serving URL logic for multiple company environment.
19.0.1.0.2 2025-12-29
- Add method to get a list of allowed settings for Google user data.
19.0.1.0.1 2025-10-15
19.0.1.0.0 2025-10-11
- Migration from 18.0.
Resources
How to configure Google First-party mode in Odoo with Cloudflare
How to Configure User-Provided Data Collection in GA4