OpenCart: Tracking Conversion Events in Google Analytics 4
This extension allows you to integrate Google Analytics 4 (GA4) events into your OpenCart store and track conversions such as add to cart and purchase.
Simple modifier with no settings
Automatic sending of GA4 events based on the latest Google recommendations
Supports standard events: add_to_cart and purchase
Easy integration directly with GA4
Who is this for:
Ideal for developers and OpenCart store owners who want complete user interaction statistics and need to track the performance of Google Ads campaigns using real conversion data.
This extension works well with the default theme, but can also work with other templates. In some cases, adaptation may be needed if add-to-cart buttons are not standard.
Extension installation instructions:
Upload the module in the admin panel in the "Extensions" : "Install".
Go to the "Modifications" section and update the cache.
Go to the "Dashboard" section and update the template cache (only for OpenCart 3).
Changelog of GA4 Key Events for Conversion Tracking
v1.0.1 (28 November 2025) - Fixed a code syntax error
How to build a variable name or array key in Twig: attribute(context, 'var'~id), square brackets, the .() operator from Twig 3.15, interpolation, and OpenCart compatibility.
An analysis of OpenCart 4.2.x.x development plans: the switch to jQuery 4.0.0, changes to `oc_product_code`, a 15–20 MB reduction in the distribution size, and the module adaptation process.
Daniel Kerr has announced the static OpenCart 5 and the opencart.js project. We analyze the advantages and limitations of this concept, as well as the development of PHP branches 3.0, 4.1, and 4.2.