This document provides an overview of the options available to migrate your Universal Analytics (UA) ecommerce implementation using analytics.js to a comparable Google Analytics 4 (GA4) ecommerce implementation using gtag.js.
Things to know
Migrate to gtag.js and send GA4 ecommerce events
To take advantage of Google Analytics 4 ecommerce features, you need to migrate from analytics.js to gtag.js and implement ecommerce events.
It's recommended to migrate to GA4 ecommerce events and not UA ecommerce events, unless you have a strict requirement to keep your UA reporting unchanged.
Event compatibility and translation between UA and GA4
For ecommerce implementations using analytics.js there is no event compatibility and automatic translation. Instead you're required to migrate to gtag.js and implement the corresponding ecommerce events.
Once you've migrated, gtag.js can automatically translate GA4 events sent to a UA property and vice versa. However, not all events and parameters can be translated so it's important you review the behavior, incompatibilities and trade-offs when relying on automatic translation.
To learn more see Event compatibility reference.
Standard ecommerce vs Enhanced ecommerce for UA and GA4 properties
For Universal Analytics properties using analytics.js, standard and enhanced
ecommerce have different implementations. The key difference is that standard
ecommerce only supports what is equivalent to a
purchase event in GA4.
Since standard ecommerce only supports a single ecommerce event, it can be migrated to GA4 with considerably less effort than an enhanced ecommerce implementation.
Selecting a migration option
Google Analytics 4 is the future of Google Analytics. It is recommended to migrate your implementation to send GA4 ecommerce events to ensure you can take advantage of all Google Analytics features.
The primary considerations when selecting an option are as follows:
- The importance of having no changes to your existing Universal Analytics data collection and ecommerce reports.
- The amount of implementation work you're willing to do now vs in the future to fully adopt GA4.
- The importance of having a fully implemented Google Analytics 4 property (i.e. moving from UA events to GA4 events) in the short-term.
Migration options based on outcome
Use the following table to identify the most appropriate migration guide based on your current implementation and desired outcome:
|Current implementation||Outcome||Key Pro/Con||Why choose this?|
Basic 1:1 migration + fully adopt GA4
A 1-to-1 migration from UA standard ecommerce to GA4 with the option to implement additional GA4 ecommerce events to take full advantage of GA4 ecommerce reports.
Pro: Easy implementation and no change to ecommerce data collected
and reported for UA. If you decide to implement additional GA4 ecommerce
events then GA4 ecommerce reports will be complete.
Con: Unless you start measuring additional ecommerce events, GA4 ecommerce reports will not be fully populated.
|You want to start using GA4 but are not ready to fully transition for the long-term and you need to keep your existing UA implementation unchanged. This allows you to migrate to a simple GA4 ecommerce implementation and keep your UA reports unchanged. You have the option to implement additional GA4 events and take full advantage of GA4 ecommerce reports.|