Google Analytics Mapping Console in AEM
Web analytics is an integral part of every application. It is a process to gather useful information to measure the behavior of the visitors on a website, levels of traffic, the most popular pages etc.
These analytics provides various insights about the visitor such as:
- The audience:
- No. of visits on your website; know if these visitors are new or returning
- Demographic data (Which country are they visiting from)
- Audience behavior:
- Where your visitors landed on the website and from which page did they exit such as homepage, services page, etc.
- The most popular pages
- Duration of the visit
- Campaign data:
- Campaign performance including the campaign that drove maximum traffic
- The domains that referred your site’s traffic
- Keywords people searched in order to find your site
Adobe Analytics is one such tool that provides a highly customizable UI to provide tracking at very granular level.
So the question is why to choose Google Analytics in AEM when we already have Adobe Analytics?
Below are the following reasons to choose Google Analytics (GA) :
- Google Analytics is the most widely used website statistics service, currently in use on around 55% of the 10,000 most popular websites.
- Another market share analysis claims that Google Analytics is used at around 49.95% of the top 1,000,000 websites (currently ranked by Alexa).
- Google Analytics is freemium and process up to 10 million hits per month for free.
- Automatic Adwords integration.
- Google Spreadsheet Integration for free.
The only limitation when using Google Analytics with AEM is the lack of flexibility that Adobe Analytics provide. Adobe Analytics provides authors with highly customizable interface to configure Analytics variables with AEM variables.
Currently, there is a generic way to integrate GA with AEM which can be found at Using GA with AEM .
Using above approach, to track any event, we need to call the GA method as :
ga(‘send’, ‘event’ {data}).
Here data will be in the form of key-value pair, where key is the GA dimensions like eventCategory, eventAction etc.
It works well in normal scenarios but what if we need to change mapping of these key-value after some days or week ?
So in this case : We need to change the calling statement in the existing code.
Moreover all the analytics information will have to made available at the time of development as every change in it would need a code change.
To cope with this problem, we need a solution in which mapping of these variables should be separated from the code and should be kept at one place for all AEM components, so that we can change it any time for any component without changing the code.
So we wanted to provide “Adobe Analytics” like experience for ‘Google Analytics’ in AEM and the plugin that we have developed does exactly that.
We just need to apply the corresponding cloud service configuration on the parent page of website as we do in case of Adobe Analytics and page tracking is taken care of by default.
Here also, data will be in key-pair form, but key will be the AEM variable instead of GA dimensions. Mapping of these AEM variables with GA dimensions can be done at mapping page separately, so that we do not need to change the code if we need to change the mapping later.
More details about using this plugin can be found at AEM-GA
If you face any issues in using this plugin or there are more features which you like to see, please create issue for that on the Github page or put in a comment here.