Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Website
  3. Google Analytics 4 eCommerce & Server-Side Tracking (CodeTrade) v 20.0
  4. Sales Conditions FAQ

Google Analytics 4 eCommerce & Server-Side Tracking (CodeTrade)

by CodeTrade India Pvt. Ltd. https://www.codetrade.io
Odoo

$ 120.00

v 20.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 17.0 18.0 19.0 20.0
You bought this module and need support? Click here!
Versions 17.0 18.0 19.0 20.0
  • Description
  • Manifest
  • License
CodeTrade Header
ODOO 20 — GA4 ECOMMERCE TRACKING

Google Analytics 4 eCommerce & Server-Side Tracking

badge
checkmark-badge Community checkmark-badge Enterprise checkmark-badge Odoo.sh

Every GA4 eCommerce Event — and Purchases Ad Blockers Can't Hide

GA4 eCommerce Tracking sends the full Google Analytics 4 eCommerce journey of your Odoo eShop: product lists, searches, product views, add to cart, cart, checkout, payment and purchase, each with GA4 items (ID, name, category, variant, price and quantity), through the Google tag or Google Tag Manager.

Purchases and refunds are also sent server-side through the GA4 Measurement Protocol when an order is confirmed or cancelled, so revenue still reaches Google Analytics with ad blockers, Safari ITP or offline payments. Consent Mode v2, a retrying queue and a debug log are included.

Depends only on the standard eCommerce app (website_sale). A Google Analytics 4 property is required; server-side events also need a Measurement Protocol API secret from your GA4 data stream.

View Demo
  • Features
  • Release Note
  • FAQ's

Everything you need to measure your Odoo shop in GA4

Install the module, enter your GA4 measurement ID (and the API secret for server-side events) in GA4 Tracking → Configuration, and every shop page starts sending GA4 eCommerce events.

Key Features

Google Tag or Google Tag Manager

Load the Google tag (gtag.js) with your G- measurement ID, push to the Google Tag Manager dataLayer (the ecommerce object is cleared before each event, as Google recommends), or send server-side only. One configuration per website.

Complete GA4 eCommerce Events

view_item_list and search on shop and category pages, view_item on product pages, add_to_cart from the product page and shop tiles, view_cart, begin_checkout, add_payment_info and purchase, each with GA4 items. Every event can be switched off.

Server-Side Purchases and Refunds

A purchase is sent through the GA4 Measurement Protocol when a website order is confirmed, whatever the payment method and also when it is confirmed later in the back office, and a refund when a tracked order is cancelled. GA4 deduplicates browser and server purchases on the transaction ID.

Reliable Event Queue

Server events are queued and sent by a scheduled action with up to 5 attempts, can be resent or cancelled by hand and are created only once per order. The visitor's GA client and session IDs are captured at checkout, with a stable generated ID as fallback.

Consent Mode v2

Default state for ad_storage, analytics_storage, ad_user_data and ad_personalization with a wait time, updated to granted when the visitor accepts Odoo's cookie bar. Third-party banners can call window.ctGa4Consent('granted') or ('denied').

Debug Mode and Sandbox

Debug mode adds debug_mode for GA4 DebugView, checks server events against Google's validation server, shows an on-page badge of the events pushed and logs every browser event in the back office. Sandbox mode and Send Test Event let you try everything safely.

Clean Analytics Data

Logged-in employees are excluded, the order value is sent with or without taxes, the item ID comes from the internal reference, barcode or product ID, and a warning appears when Odoo's own Google Analytics key would count page views twice.

Event Log and Analysis

Server Events and Browser Debug Log list every event with its order, value, status, attempts and full payload, and Event Analysis summarises them by event and status. GA4 Users read, GA4 Managers configure; multi-company rules apply.

  • Configuration
  • Events on Your Shop
  • Server-Side Purchases
  • Debug Log & Analysis
  • Tag Manager & Consent

GA4 Configuration

GA4 Tracking → Configuration: one configuration per website with the measurement ID, browser tag, API secret, sandbox and debug options. The Sent, Queued and Failed buttons open the events of that status.

GA4 Configurations

Choose the browser events and how purchases, refunds, order value and item ID are sent.

eCommerce Events

Consent Mode v2 default state, wait time and Odoo cookie bar integration.

Consent Mode v2

Events on Your Shop

With debug mode on, the badge at the bottom left lists every event pushed. A search on the shop sends view_item_list and search.

Shop search

A product page sends view_item with the item ID, category and price.

Product page

Add to cart sends add_to_cart with the quantity and value.

Add to cart

The cart sends view_cart, then begin_checkout and add_payment_info during checkout.

Cart

Server-Side Purchases

When the order is confirmed a purchase is queued with the order number, value, taxes, shipping and items, and sent to the Measurement Protocol.

Server-side purchase

Cancelling a tracked order queues a refund for the same transaction.

Refund

Server Events lists every purchase, refund and test event with its status and attempts.

Server Events

Debug Log and Analysis

In debug mode every browser event is logged with its page and payload.

Browser Debug Log

Event Analysis summarises events by name and status.

Event Analysis

Send Test Event checks the API secret (here in sandbox mode).

Send Test Event

Tag Manager and Consent

Switch the website to Google Tag Manager by choosing it as browser tag and entering the container ID.

Google Tag Manager

With Odoo's cookie bar on, consent stays denied until the visitor clicks I agree.

Cookie bar
Version 1.0 : 20.0.0.0.0

08 October 2026

Can I use this module with Odoo Online (SaaS)? angle

This module cannot be used with Odoo Online (SaaS). It is compatible with Odoo Community, Enterprise, and Odoo.sh deployments.

What do I need from Google Analytics? angle

A GA4 property and its web data stream measurement ID (G-XXXXXXXXXX). For server-side purchases and refunds, create a Measurement Protocol API secret in GA4 Admin → Data streams → your web stream. For Google Tag Manager, your GTM container ID.

Will purchases be counted twice, once from the browser and once from the server? angle

No. Both carry the order number as transaction_id and GA4 deduplicates purchases on it. The server-side event makes sure the purchase is still recorded when the browser event is blocked.

Does it respect cookie consent? angle

Yes. With Consent Mode v2 the default state is denied until the visitor accepts Odoo's cookie bar. Without a cookie bar Odoo considers consent given. Other consent banners can call window.ctGa4Consent('granted') or ('denied').

Should I keep the Google Analytics key in the Website settings? angle

No. Remove it, otherwise page views are counted twice. The GA4 configuration shows a warning while it is set.

Can I test without sending data to Google? angle

Yes. Sandbox mode queues and logs server events and simulates Google's answer. Debug mode sends events to GA4 DebugView and validates server events against Google's validation server, and Send Test Event checks the API secret.

You May Also Like

Get Support, For Free!

60 Days Free Support

mail
Mail us support@codetrade.io
Support

Language Translation

English

Our Services

Odoo Services
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • eCommerce (website_sale)
• Website (website)
• Discuss (mail)
• Invoicing (account)
Lines of code 1050
Technical Name ga4_ecommerce_tracking_codetrade
LicenseOPL-1
Websitehttps://www.codetrade.io
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with