Introduction
This article describes how to activate the Google Analytics 4 integration to start tracking your online publications. But first, there are a few important things to know about making the connection as effective as possible.
Enhanced Event Measurement and custom events
Publitas leverages Enhanced Event Measurement to track pageviews and user flow. Custom pageview events are also recorded, which contain publication-specific details that can be used for advanced reporting. Other custom events are recorded to help track the performance of your online publications and build richer audiences.
Check out all events and parameters recorded for online publications
GA4 Data Stream with Enhanced measurement enabled:
Tracking embedded publications
As of this moment, Google Analytics 4 still relies on cookies to track data. For embedded publications to be able to set and update cookies, the embedded domain needs to be the same as the domain of the website embedding it. Make sure to connect a custom domain to your publications that matches your website's domain.
For example, connect catalog.mydomain.com to the publications if your website is www.mydomain.com.
Once a custom domain is connected to your publication, the embed code is also updated to use the new domain. Make sure to replace any previous embed codes with the new ones.
Click here to learn more about connecting a custom domain to your publications.
Step 1: Preparations
Cross Domain Tracking (recommended)
Do you wish to learn more about how publications influence shopping behavior and do you want to allocate sales to the original source of traffic? Then go for tracking your website and online publications in a cross domain tracking setup. Combining publication and website data allows you to build catalog-specific audiences and leverage GA4's predictive insights to learn more about catalog readers' shopping behavior.
Consider the following preparations:
- In Google Analytics, locate the website's property in the Admin section and select Data streams
- Click on the data stream for web and first copy the Measurement ID
- Then, go to More Tagging Settings, found at the bottom
- Select Configure your domains and add a condition where the domain exactly matches view.publitas.com or your custom publication domain
Creating a dedicated property for publications
If you don't want to combine website and publication data in the same property through cross domain tracking, start off by creating a dedicated property following these steps.
(If did choose cross domain tracking, go directly to Connect your Google Analytics property to Publitas)
In Google Analytics
- Go to the Admin section, found in the bottom left corner
- Select the correct account in the first column (if applicable), then select Create property at the top of the second column
- Enter a name for the new property, then select the applicable time zone and currency
- Click on Next and on Create (entering the details of your business is optional)
- Select Web and enter view.publitas.com or your custom domain as the Website URL
- Enter a Stream name (e.g. use the publication domain)
- Make sure the Enhanced Measurement is enabled, then copy the Measurement ID
- Go to Data Settings in the admin section, and change Data Retention to 14 months
Step 2: Connect your Google Analytics property to Publitas
To connect the Publitas to Google Analytics, open the Group Settings menu in Publitas and add the Measurement ID that was copied in the previous step. Make sure to store the changes by clicking on "Save Settings".
Adding a Measurement ID to connect Google Analytics:
Step 3: Add custom dimensions to Google Analytics
Out of the box, all custom events are recorded by Google Analytics. Each event contains a set of event parameters to support advanced filtering of data in reports and dashboards. To store these event parameters in Google Analytics as well, custom dimensions need to be created for each of them.
Click here to find all events and parameters recorded for online publications
In Google Analytics, go to Admin > Custom Definitions to create the following set of custom dimensions:
Dimension name |
Event parameter |
Scope |
Publitas Event Action | pbl_action | Event |
Publitas Event Value | pbl_value | Event |
Publitas Group Name | pbl_group | Event |
Publitas Page Number | pbl_page | Event |
Publitas Product ID | pbl_product_id | Event |
Publitas Product Title | pbl_product_title | Event |
Publitas Publication Name | pbl_publication | Event |
Step 4: Test the connection
Once the setup is completed your publications will be tracked by Google Analytics.
To verify the connection, select the connected property in Google Analytics. The home page will appear which also shows you the users that were active in the last 30 minutes. The connection with Google Analytics is successful if this widget shows at least one active user within a minute after you open one of the publications in your browser.
Make sure to have a publication open somewhere while looking for active users:
Using Google's Tag Assistant
If you have access to Google Tag Manager, you can load one of the publication in the preview option of any container and, in Google Analytics, look at the DebugView to see whether data is being recorded.
The DebugView in Google Analytics is found in the Admin section:
Step 5: Ask users for consent (optional)
When asking users to consent to being tracked, Google Analytics will only start tracking once consent has been given. If no consent is provided, no data will be stored.
To optimize the consent request you can change the banner text, displayed when a publication is opened.
Enabling the option to ask for consent first:
Preview of the consent banner: