Skip to Content

GA Measurement Protocol

Leave your feedback
https://garazd.biz/web/image/product.template/232/image_1920?unique=0c5612b

282.17
282.17 4
282.16653854405035 USD

Not Available For Sale

  • Odoo Version

  • Price

This combination does not exist.

Price: Paid

Overview

The Google Analytics Measurement Protocol is a method for sending data directly to Google Analytics via API. Measurement Protocol supplements, not replaces, tracking data collection via gtag.js and DataLayer scripts.

The Google Analytics Measurement Protocol app connects your Odoo website to Google Analytics through server-side integration, providing enhanced tracking data for more accurate analytics.

Find out more about the Google Analytics Measurement Protocol: https://developers.google.com/analytics/devguides/collection/protocol/ga4

Availability
Odoo Online
Odoo.sh
On Premise
Compatibility
Community
Enterprise
Technical Name website_sale_google_analytics_api
Version 19.0.1.0.3
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.

Odoo Update App List

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.

Odoo App Installation

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

View Odoo App Description

Manual

check circle fill

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:

odoo settings website activate tracking debug logging
If you use Odoo's built-in Google Analytics feature, disable it and transfer the identifier to a new tracking service.
odoo settings website disable google analytics
fa cookie

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.

odoo website google consent settings list
ads click rounded

Configuration

The module allows you to track e-commerce events on your website and send them to Google along with product information and user-provided data. You can send this data via Google Tag and via API. These features are implemented at the tracking service level. Add and configure a tracking service for your Odoo website.

Adding a Tracking Service

Go to the Website - Configuration - Tracking - Services menu and click New to add a new tracking service.

odoo website configuration tracking services new

Firstly, fill in the following fields in the new tracking service:

odoo google analytics 4 tracking service website type key
  • Specify a Website (if using multiple websites)
  • Select Google Analytics 4 as the service Type
  • Paste your GA4 Measurement ID into the Key field

Then, specify the type of product identifier and product category sent to Google.

odoo google analytics 4 tracking service item type category

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.

odoo tracking service options lead value

This field represents the monetary value of a lead generation, based on estimated evaluations.

Measurement Protocol Activation

Enable the Internal Logs option.

odoo tracking service options internal logs
Internal logging is required for API integration.

After that, switch on the API mode by enabling the Activate option in the API section.

odoo ga measurement protocol tracking service options api activate access token

Next, log in to your Google Analytics account and create an Access Token under Web stream details, Events section, and Measurement Protocol API secrets.

google analytics 4 web stream details measurement protocol api secrets

Copy the Secret value and paste it into the Access Token field in Odoo.

google analytics 4 measurement protocol api secrets value
fa share from square

Sending Tracking Data

Internal logs record visitor actions on your Odoo website to assist with further analysis and monitoring. Click the Logs button at the top of the form.

odoo google analytics 4 tracking service logs button

Enable the State and API Sent Date columns to display a status and the date of event sending through the Measurement Protocol:

ga measurement protocol tracking logs state api sent date

Scheduled Actions

The module uses a scheduled action to send tracking events periodically. By default, this action runs every 30 minutes, but you can adjust this interval to meet your requirements.

ga measurement protocol scheduled action

To send tracking data manually, select tracking logs from the list or open a log and click on Send Event.

ga measurement protocol tracking log send event

Sensitive Data Cleanup

Because tracking logs may contain sensitive data, configure a cleanup schedule. Go to the website settings and set the cleaning period. The default period is 30 days.

odoo website settings clean up period for internal tracking logs unlink

Enable the Unlink Logs After Period option to completely remove tracking logs older than the specified period.

fa address card

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.

odoo google analytics 4 tracking service advanced matching allow enhanced conversions

Review the options and leave enabled the user-provided data that should be sent to Google.

The module sends user data securely as it is hashed in accordance with Google's requirements.

Use the Sale Order Partner value as the Customer Data Source because it provides more user information when guest checkouts are allowed without registration.

odoo tracking service advanced matching sale order partner

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:

odoo tracking service technical identifier field
The specified product field should provide non-empty values and remain unique for each product. Otherwise, the tracking data for this product becomes unusable.

Purchase on Portal

To track portal purchases, enable the Track Purchase on Portal option:

odoo tracking service technical track purchase on portal

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:

odoo tracking service technical exclude delivery

Exclude Rewards

To exclude reward order lines from tracking data, enable the Exclude Reward option:

odoo tracking service technical exclude reward

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:

odoo website enhanced tracking event settings add to cart on click
  • Navigate to Website — Configuration — Websites
  • Open the website on the Enhanced Tracking tab
  • Enable the Add to Cart on Click option
Tracking the actual addition might fail if third-party modules modify the logic. In this case, this option allows for event tracking by binding it to button selectors used in native Odoo website templates.

Purchase

To track purchases only after a successful payment transaction, enable the Track Confirmed Purchases only option:

odoo website enhanced tracking event settings track confirmed pending purchases
This option only affects the event transmission through the tracking service; the internal log records the event regardless.

If business logic considers an order with a Pending payment status as a purchase, enable the Track Pending Purchases too option as well.

fa bug

Testing

Test the Google Analytics Measurement Protocol integration to ensure accurate event tracking.

Two verification methods are available:

  • Realtime Overview — monitor live events directly within the Google Analytics user interface
  • Debug Mode — validate payloads using the Measurement Protocol validation server

Realtime Overview

The first way to test the Google Analytics Measurement Protocol integration is to use the Realtime Overview. Enable the Remove JS Script option to prevent events from being sent to Google Analytics via script before the API.

ga measurement protocol tracking service options remove js script
For testing, log out of Odoo or use a different browser, as website tracking does not work for internal Odoo users.

Once the state of internal logs sending has changed to Sent, go to Google Analytics, then open the Reports menu and the Realtime Overview page.

google analytics 4 reports realtime overview

Review the Event count by Event name and Key events by Event name sections, which should contain the events you sent.

Measurement Protocol Validation Server

To verify the integration with the Measurement Protocol validation server, enable the Debug Mode option in your Google Analytics tracking service settings.

ga measurement protocol tracking service options debug mode

Open one of the events and send it manually. If the log status has changed to Debug and on the Technical tab, the API Response field has the OK value, which means that no errors were found.

ga measurement protocol tracking log debug

If the status changed to Warning or Error, check the API Response field for details on why.

ga measurement protocol tracking log warning api response

After completing testing, disable Debug Mode and send the event again. The Sent status means that the event was successfully sent via API to Google Analytics.

ga measurement protocol tracking log sent

Changelog

17.0.1.0.2 2026-05-25

  • Improve getting of the list of allowed settings for user data.

17.0.1.0.1 2026-04-20

  • Improve parsing of Google Analytics session reference from cookies.

17.0.1.0.0 2024-09-05

  • Init version.

16.0.1.0.1 2024-10-23

  • Improve the logic to check available user tracking fields to activate.

16.0.1.0.0 2024-10-18

  • Init version.

18.0.1.1.2 2026-05-25

  • Improve getting of the list of allowed settings for user data.

18.0.1.1.1 2026-04-20

  • Improve parsing of Google Analytics session reference from cookies.

18.0.1.1.0 2025-10-12

  • Decrease the price.
  • Improve demo data.

18.0.1.0.0 2025-01-14

  • Migration from 17.0.

19.0.1.0.3 2026-05-25

  • Add handling of event validation response data.
  • Add demo data.

19.0.1.0.2 2026-04-20

  • Improve parsing of Google Analytics session reference from cookies.

19.0.1.0.1 2025-12-29

  • Improve getting of the list of allowed settings for user data.

19.0.1.0.0 2025-10-12

  • Migration from 18.0.

Reviews

Our customers have already appreciated the quality, reliability, and performance of the solutions we offer

Login to leave a comment

FAQ