BETA NOTICE: If you're interested in using this beta feature and you're on the Enterprise plan, please reach out to your success manager, who will activate this for you.
In this article you can find simple instructions to setup Universal Analytics tracking using Google Tag Manager. If you haven't connected Google Tag Manager to Publitas yet, check out Setting up Google Tag Manager.
- Step 1: Import Variables, Triggers and Tags into GTM
- Step 2: Connect your GA Property
- Step 3: Configure the custom dimension in Google Analytics
- Step 4: Publish the changes
- How to process future updates
Step 1: Import Variables, Triggers and Tags into GTM
- Download the settings attached to this article
- Go to the Admin section of Google Tag Manager
- Select Import Container
- Select the file to import
- Select a workspace
- Select to Merge the selected workspace with content of imported container
- Select Rename conflicting tags, triggers, and variables
- Click Confirm
Wish to update to the latest version?
If you have already installed Universal Analytics before and wish to update your configurations with the latest updates and additions, please read How to process future updates.
Step 2: Connect your GA Property
- Go to the Variables section of Google Tag Manager
- Locate and edit the CS - UA Property variable
- Update the Value with your Tracking ID
- Click Save
Using one property to track both website and online publications
If you wish to track the publications using the same property that is already tracking your website make sure to review the following elements and align these with the existing GA configurations:
- CS - UA Property : This variable might be redundant.
- UA - Google Analytics Settings : Here, Custom dimensions 1, 2, 3 and 4 are configured. If you have already assigned these custom dimensions yourself, make sure to assign the dimensions to index numbers you still have available. If you wish to use your own GA Settings make sure to copy over all relevant settings and update all Tags to refer to the correct Google Analytics Setting variable.
When Google Analytics is already connected to your publications via Publitas
If you already have a GA property connected to Publitas we recommend to remove its tracking ID from Publitas once you submit the tracking configuration via Google Tag Manager. Your historic data will remain available. Do know that different event names are used in the GTM implementation of GA, so be sure to adapt your custom reports and dashboards accordingly.
Disconnecting GA from Publitas in order to connect GA via GTM:
Alternatively, you can also use a different property for the GTM configuration. This way, both the GA and GTM integrations can track your publications in parallel. This can also help you transition to the new tracking solution where you can disable the GA integration as soon as you're happy with the data tracked via the GTM integration.
Step 3: Configure the custom dimension in Google Analytics
To help create useful reports and dashboards the pageview configuration also sends over the publication name, page number, product name (Gold+) and group name (Enterprise only) to GA as custom dimensions. These can be used to, for example, filter the data for a specific publication or list the page numbers in your reports.
Use custom dimension in your reports:
- Go to the Admin section of Google Analytics
- Select the correct GA property (middle column) and open Custom Definitions > Custom Dimensions
- Add the following Custom Dimensions in order:
- Publication (Scope: Session)
- Page (Scope: Hit)
- Product (Scope: Hit)
- Group (Scope: Session)
Adding custom dimensions:
IMPORTANT: If you applied different index numbers to the custom dimension (see step 2), make sure that the new custom dimension are connected to the corresponding index numbers in GA as well.
Step 4: Publish the changes
Once everything is set, you can use the Preview option in Google Tag Manager to validate that all events, pageviews and custom dimensions are firing correctly. If you are happy with the results, click on Submit in Google Tag Manager to publish the tracking configurations and start tracking your publications.
How to process future updates
Over time, more data will be added to the data layer to support tracking new features and even more interactions. We recommend not to change the names applied to the variables, trigger and tags.
You can always find the latest settings attached to this article. By completing step 1 and step 4 again. you can import and processing the latest changes to your tracking setup.
By choosing to Rename conflicting tags, triggers, and variables at step 1.7 you will be able to review each change before applying them to your own setup. If a variable, tag, or trigger in the new container has the same name but the contents are different, you can rename the new one, compare it with the old one and consider whether you want to adopt the latest changes or not. New variables, triggers and tags will be added to your container either way.
If you haven't customized any of the settings since the last time you imported them, you can also choose to Overwrite conflicting tags, triggers, and variables. If a variable, tag, or trigger in the new container has the same name but the contents are different, this will overwrite the old one with the new one. New variables, triggers and tags will be added to your container either way.