Configure Google Tag Manager Integration in the Back-Office (Google Analytics 4)
The configuration of Google Tag Manager with Google Analytics 4 is available starting from OroCommerce v5.0.4. To check which application version you are running, see the system information.
Integration between your Oro application and Google Tag Manager enables you to add tracking tags to your OroCommerce web store pages and collect information on customer behavior, purchases, product clicks, page views, etc. All this information can subsequently be shared with Google Analytics 4 (GA4), enabling you to monitor various user interactions with products on your website. This can help you get a complete picture of on-page visitor behavior, how well your marketing strategies work, and how to target your audience better.
Please, be aware that you must have Google Tag Manager and Google Analytics 4 accounts already created to proceed with the integration between your Oro application and Google Tag Manager and pass data to Google Analytics 4.
On the Google Analytics Side
Switch from Google Analytics Universal to Google Analytics 4
Google Universal Analytics (GA-UA) is deprecated on July 1, 2023 and is replaced with Google Analytics 4 (GA4). As the transition to GA4 comes with significant changes, including how data is viewed, collected, and tracked, we recommend that you create a GA4 integration well in advance of the deprecation date to ensure a seamless migration from GA-UA to GA4.
You can configure a new GA4 property alongside the existing GA-UA one. These two properties work alongside each other simultaneously, with your existing GA-UA property seeing no changes and continuing to collect data as usual. You can access both properties from the Admin menu panel (1) or via the property switcher on the top left of the home page (2).
Create a Google Analytics 4 Property
To create a GA4 property, navigate to your Google Analytics account.
There are two ways to create a new property.
This method enables you to create a GA4 property in one click, copying the property name, website URL, timezone, and currency from the existing Google Universal Analytics property.
- Click Admin on the bottom left.
- Under the Property column, select the Google Universal Analytics property to copy the initial data from (e.g., name, URL, timezone, currency).
- Click GA4 Setup Assistant.
- Click Get Started > Create Property under I want to create a new Google Analytics 4 property.
Your new Google Analytics 4 property should now be created.
With this method, you can create a new GA4 property from scratch, regardless of whether you are new to Google Analytics.
- Click Admin on the bottom left.
- Click + Create Property under the Property column.
- Provide a name for the property, select the reporting time zone and the currency. Keep in mind that Google Analytics tracks only one currency at a time. This means that if, for example, your default currency is set to US Dollar, but you have a multi-currency web store (available for the Enterprise edition only), a purchase of 100EUR will be tracked in the converted dollar amount of 107USD (depending on the currency rate that day).
- Click Next. Select your industry category and business size.
- Click Create.
Remember that, unlike your GA-UA property number, which goes with the UA prefix as in UA-XXXX, your new GA4 property number is created as XXXX without the prefix.
Set up a Data Stream
Once you created a property, the next step is to set up a data stream to start collecting data.
- In your Admin menu, make sure you have selected the required property under the Property column.
- Click Data Streams and select the platform (Web, Android app, or IOS app) to add a data stream. You can add as many data streams as required.
- For Web, provide the URL of your website (e.g., “mywebsite.com”) and a stream name. Click Create stream.
- For IOS app or Android app, add the Android package name, the app name, or the App Store ID, then click Register app. Follow the provided instructions to finish the configuration of data streams.
Once a data stream is set, add tags to your web pages via Google Tag Manager.
Keep the Measurement ID at hand, as you will need it when configuring tags in Google Tag Manager.
On the Google Tag Manager Side
On the Oro Side
Configure a Google Tag Manager Integration in the Back-Office
To configure a Google Tag Manager integration:
- Navigate to System > Integrations > Manage Integrations in the main menu.
- Click Create Integration on the top right.
- In the Type field, select Google Tag Manager.
- In the Name field, provide the name for the integration you are creating to refer to it in the Oro application. Since you can create many Google Tag Manager integrations, make sure the name is meaningful.
- In the Container ID field, provide the Google Tag Manager Container ID. The Container ID is located in your Google Tag Manager account on the top right of the workspace page. It is formatted as GTM-XXXXXX.
- In the Status field, set the integration to Active to enable it. Should you need to disable it, select Inactive from the list.
- In the Default Owner, select the owner of the integration.
- Click Save and Close.
Once the GTM integration is configured, you must connect it to the application in the system settings on the required level: