Overview
What is Google Analytics 4, it is an analytics system that collects tracking events data about customer actions on your website and provides you with useful dashboards and reports to analyze your marketing results.
Odoo Google Analytics 4 app allows you to get tracking data analysis and insights to improve your website, provides you with website KPI measurement to make a conversion optimization. GA4 helps you visualize the behavior of visitors on your Odoo website, their journey through the web pages, and the actions they perform.
Implementation
The app implements tracking of recommended events for online sales that include the following actions:
- lead generating - when a customer has submitted a form, e.g. on the Contact Us webpage;
- signing in - when a customer has registered on the Odoo website;
- logging in - when a customer has logged in to his account on portal;
- product searching - when a customer searching products in the online catalog;
- product viewing both in the product list and on the product page;
- adding product to the wishlist;
- cart monitoring - when a customer adds a product to the cart from the product page, product list or from the wishlist;
- initiating of the checkout process;
- filling shipping and payment data;
- making purchase - when a customer complete the checkout process on the confirmation page.
The Odoo Google Analytics 4 eCommerce tracking solution provides enhanced functionality and completely new tracking logic, in comparison with the standard Odoo Google Analytics 4 implementation, which was released in version 15.0 Odoo.
The scheme of events tracking is the following:
Advantages of Odoo Google Analytics 4 eCommerce tracking
Allows to set an impersonal unique identifier for portal users (website customers) and send it to GA4.
One of the main features of this app is supporting of multiple tracker adding, so you can activate and configure several GA4 Measurement ID for each Odoo website in your system.
This feature provides internal logging of the customer tracking events, thereby this data can be analyzed in convenient for your business way, and extend your company's analytics capabilities.
In addition to the above features, tracking data contains all required and most of the optional event parameters to get a complete picture of conversion tracking.
Using one of our tracking solutions, you get a professional tool to analyze your website activity and promote your products on Google. This app is a part of the Garazd Creation Marketing Apps which cover business marketing needs and fully compatible with each other. This solution is complemented by the app.
Availability |
Odoo Online
Odoo.sh
On Premise
|
---|---|
Compatibility |
Community
Enterprise
|
Technical Name | website_sale_google_analytics_4 |
Version | 18.0.1.2.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

The solution cleans sensitive tracking data such as payload, client IP address, and user agent. You can control the period after which the purging is performed. By default, it's 30 days.
Additionally, you can activate the "Completely delete log entries older than the specified period" option to remove all internal tracking log records after this time.
Click on the "Manage Tracking Services" link in the Settings view, or go to the "Configuration" - "Tracking" - "Services" menu and create a new tracking service for your Odoo website.

- Specify a website (if you have a multi-website environment).
- Select the service type "Google Analytics 4".
- Fill in your GA4 MEASUREMENT ID.
If you want to get data about tracking events in Odoo, activate the "Internal Logs" option. To view the log records related to the current service, click the "Logs" button at the top of the form.

You can send a unique identifier of a portal user to Google with website tracking events. The user ID is a randomly generated code in Odoo that does not contain any personal data about the website visitor.
On the Google Analytics side, this identifier helps to analyze a visitor behavior on your website across different sessions and on different devices used by the user. GA4 User-ID helps to consolidate tracking data for cross-platform analysis.
Found out more about the User-ID feature by this link: https://support.google.com/analytics/answer/9213390.
To add "User-ID" to GA4 events tracking data, open the "Advanced Matching" tab and activate the "External ID" option.

To test and debug your integration with Google Analytics 4, activate the "Debug Mode" in the GA4 tracking service.

Then open Google Analytics 4 and go to "Admin" menu, choose your GA4 property and select the "DebugView" report.
All tracking events from your website will be displayed in this view in near real-time.

As the GA4 gtag script does not have to send tracking data about a website activity of internal users, there are several testing tips:
- You will not see the gtag.js script if you are logged in to Odoo and you have internal user's access rights.
- Log out from the system or use the incognito mode or other browser to test Google Analytics 4 script.
- How to set up Google tag gateway: https://developers.google.com/tag-platform/tag-manager/gateway/setup-guide
- Set up Google tag gateway with Cloudflare: https://support.google.com/tagmanager/answer/16061406
- Google First-party mode - load Google scripts through server-side tagging: https://developers.google.com/tag-platform/tag-manager/server-side/dependency-serving

https://www.googletagmanager.com/
, click the button on the right.



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.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.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.