{"id":42898,"date":"2016-12-05T15:33:45","date_gmt":"2016-12-05T10:03:45","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=42898"},"modified":"2017-01-02T15:52:36","modified_gmt":"2017-01-02T10:22:36","slug":"google-analytics-mapping-console-in-aem","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/google-analytics-mapping-console-in-aem\/","title":{"rendered":"Google Analytics Mapping Console in AEM"},"content":{"rendered":"<p><span style=\"font-weight: 400\">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.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">These analytics provides various insights about the visitor such as:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The audience:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">No. of visits on your website; know if these visitors are new or returning<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Demographic data (Which country are they visiting from)<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Audience behavior:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Where your visitors landed on the website and from which page did they exit such as homepage, services page, etc.<\/span><\/li>\n<li style=\"font-weight: 400\">The most popular pages<\/li>\n<li style=\"font-weight: 400\">Duration of the visit<\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Campaign data:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Campaign performance including the campaign that drove maximum traffic\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\">The domains that referred your site\u2019s traffic<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Keywords people searched in order to find your site<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Adobe Analytics is one such tool that provides a highly customizable UI to provide tracking at very granular level.<\/p>\n<p>So the question is why to choose <a title=\"Google Analytics\" href=\"http:\/\/www.tothenew.com\/blog\/tag\/google-analytics\/\" target=\"_blank\">Google Analytics<\/a> in <a title=\"AEM Development\" href=\"http:\/\/www.tothenew.com\/wcm\/cq-aem-development-consulting\" target=\"_blank\">AEM <\/a>when we already have Adobe Analytics?<\/p>\n<p><span style=\"font-weight: 400\">Below are the following reasons to choose Google Analytics (GA) :<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Google Analytics is the most widely used website statistics service, currently in use on around 55% of the 10,000 most popular websites.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">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).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Google Analytics is freemium and process up to 10 million hits per month for free. <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Automatic Adwords integration.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Google Spreadsheet Integration for free.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The only limitation when\u00a0<\/span>using <a title=\"Google Analytics Mapping Console in AEM\" href=\"http:\/\/www.tothenew.com\/blog\/google-analytics-mapping-console-in-aem\/\">Google Analytics with AEM<\/a> is the lack of flexibility that Adobe Analytics provide. Adobe Analytics provides authors with highly customizable interface to configure Analytics variables with AEM variables.<\/p>\n<div id=\"attachment_42900\" style=\"width: 877px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-42900\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-42900 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/11\/moderation-1.png\" alt=\"Adobe Analytics Mapping page\" width=\"867\" height=\"618\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/11\/moderation-1.png 867w, \/blog\/wp-ttn-blog\/uploads\/2016\/11\/moderation-1-300x213.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/11\/moderation-1-624x444.png 624w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><p id=\"caption-attachment-42900\" class=\"wp-caption-text\">Adobe Analytics Mapping<\/p><\/div>\n<p><span style=\"font-weight: 400\">Currently, there is a generic way to integrate GA with AEM which can be found at <\/span><a href=\"https:\/\/docs.adobe.com\/docs\/en\/aem\/6-0\/administer\/integration\/external-providers.html\"><span style=\"font-weight: 400\">Using GA with AEM<\/span><\/a><span style=\"font-weight: 400\"> .<\/span><\/p>\n<p><span style=\"font-weight: 400\">Using above approach, to track any event, \u00a0we need to call the GA method as :<\/span><\/p>\n<pre><span style=\"font-weight: 400\">     ga(\u2018send\u2019, \u2018event\u2019 {data}).<\/span><\/pre>\n<p><span style=\"font-weight: 400\">Here data will be in the form of key-value pair, where key is the GA dimensions like eventCategory, eventAction etc.<\/span><\/p>\n<p><span style=\"font-weight: 400\">It works well in normal scenarios but what if we need to change mapping of these key-value after some days or week ?<\/span><\/p>\n<p><span style=\"font-weight: 400\">So in this case : We need to change the calling statement in the existing code.<\/span><\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>So we wanted to provide &#8220;Adobe Analytics&#8221; \u00a0like experience for &#8216;Google Analytics&#8217; in AEM and the plugin that we have developed does exactly that.<\/p>\n<p>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.<\/p>\n<p>Here also, data will be in key-pair form, but key will be the AEM\u00a0variable instead of GA dimensions. Mapping of these AEM\u00a0variables 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.<\/p>\n<p><strong><span style=\"font-weight: 400\">More details about using this plugin\u00a0can be found at <\/span><a href=\"https:\/\/github.com\/IntelliGrape\/aem-ga\"><span style=\"font-weight: 400\">AEM-GA<\/span><\/a><\/strong><\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.\u00a0 These analytics provides various insights about the visitor such as: The audience: No. of visits on your website; know if [&hellip;]<\/p>\n","protected":false},"author":569,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":30},"categories":[1],"tags":[4847,4267,171],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/42898"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/569"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=42898"}],"version-history":[{"count":1,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/42898\/revisions"}],"predecessor-version":[{"id":53735,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/42898\/revisions\/53735"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=42898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=42898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=42898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}