{"id":36913,"date":"2016-06-28T11:22:06","date_gmt":"2016-06-28T05:52:06","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=36913"},"modified":"2016-06-30T10:11:15","modified_gmt":"2016-06-30T04:41:15","slug":"google-analytics-automation-script","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/google-analytics-automation-script\/","title":{"rendered":"Google Analytics Automation Script"},"content":{"rendered":"<p><strong>Google Analytics<\/strong> is a freely available web analytics tool offered by Google that <a href=\"http:\/\/www.tothenew.com\/blog\/click-event-tracking-using-google-tag-manager-v2\/\">tracks<\/a> and reports website traffic. It is one of the most commonly used web analytics service on the Internet<strong>.<\/strong> Google Analytics provide immediate feedback through a dashboard in a language that our stakeholders understand.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-36915\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/06\/blog1.png\" alt=\"blog1\" width=\"865\" height=\"231\" \/><\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span style=\"text-decoration: underline;\">Fig.\u00a0One small snippet of tracking code of Google analytics<\/span><\/strong><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>How to Setup a Basic Google Analytics Account<\/strong><\/span><\/p>\n<ul>\n<li>Sign up or Sign In into your Google Analytics account<\/li>\n<li>Go to https:\/\/www.google.com\/analytics\/ URL<\/li>\n<li>It will return a code<\/li>\n<li>Paste the code just below the &lt;\/body&gt; tag into your HTML page.<\/li>\n<li>Put GA code on every webpage<\/li>\n<li>Edit-&gt; Find and Replace is the easiest option to do this.<\/li>\n<li>By putting GA code in the template pages, it will be directly accessed by every page<\/li>\n<li>Go to the Google Analytics dashboard page (configure it according to your use) to see daily metrics<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Metrics and Dimensions of Google Analytics<\/strong><\/span><\/p>\n<p>Every report in Google Analytics is made of the valid combinations of their dimensions and metrics.<br \/>\n<strong>Dimensions<\/strong> describe characteristics of your users, their sessions and respective actions. The dimension \u201c<em>City\u201d<\/em> represents the characteristic of sessions and displays the name of the city. For example, &#8220;New Delhi&#8221; or &#8220;Tokyo&#8221;, from which each session is originated for the page you want to track. The dimension \u201c<em>Page\u201d<\/em> describes the behavior of page view actions and displays the URL of each page that was viewed.<\/p>\n<p><strong>Metrics<\/strong> are quantitative measurements of data. For example, the Metric \u201c<em>Sessions\u201d<\/em> is the total number of sessions for the page you want to track. Similarly, \u201c<em>Pages per Session\u201d <\/em>metric gives the average number of pages viewed per session.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Valid Combinations<\/span>: <\/strong>All dimensions and metrics can\u2019t be queried together. Only certain valid combinations of dimensions and metrics can be queried together. Select a valid combination of dimensions or metrics checkbox to see all the other values that can be combined in the same query. Below is the URL where we can see the list of Dimensions and Metrics.<\/p>\n<p>https:\/\/developers.google.com\/analytics\/devguides\/reporting\/core\/dimsmets<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>How Google Analytics Helps in Day-to-Day life?<\/strong><\/span><\/p>\n<ul>\n<li>Daily, Weekly, monthly &amp; yearly tracking of web visits by the user<\/li>\n<li>Graphed on the basis of time<\/li>\n<li>Which pages they go to, how much time they spent<\/li>\n<li>Bounce rate<\/li>\n<li>Entrance pages<\/li>\n<li>How they got there<\/li>\n<li>Via Search engines or using Search terms<\/li>\n<li>Location tracking, operating system used, monitor resolution used<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>How to Get Automated Data in Google analytics?<\/strong><\/span><\/p>\n<p><strong>Google Analytics Report Automation (Magic) <\/strong>is a Google Add-ons integration that helps in achieving the inputs required to put Google Analytics data into any application script, supported product, such as Google Spreadsheets, Google Docs or Sites.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Steps to get Automated Data in Google Analytics:-<\/strong><\/span><\/p>\n<ol>\n<li>Open a new Google Spreadsheet, provide the desired name and add a new Add-ons (google-analytics-add-ons) via get add-ons.<\/li>\n<li>Go to newly added add-ons Google Analytics and click on <strong>Create a New Report <\/strong><\/li>\n<li>Provide all the inputs for a new query:<\/li>\n<\/ol>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Report Name: <\/strong>Enter your desired name<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Type<\/strong>: <em>core &#8211;\u00a0<\/em>Required, no need to change this<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Profile ID: <\/strong>ga:&lt;<em>id<\/em>&gt; &#8211; Your profile ID, Required(Mandatory)<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Start Date: <\/strong>Either specify the start\/end dates or use last n- days field<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 End Date: <\/strong>2016-02-24<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Last n Days: <\/strong>7<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Metrics: <\/strong>ga:visitors, ga:newVisits, ga:visits<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Dimensions: <\/strong>ga:city<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Sort: <\/strong>Output returned are sorted alphabetically. If we want to sort it in ascending order. Let\u2019s add -ga:visitors<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Filter: <\/strong>ga:medium<\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SpreadsheetURL:<\/strong> Provide the URL of the page where you want the result or enter the sheet name.<\/p>\n<ol start=\"4\">\n<li>After providing all the required query inputs value, click on <strong>Run Report<\/strong><\/li>\n<li>After clicking on Run Report, an automated result will be returned to the user in the sheet or in the provided sheet URL.<\/li>\n<\/ol>\n<p>Google Analytics enables stakeholders and product owners about their business through its effective reporting. However, there are certain problems that one faces while using it. Good thing is there are alternatives which can be used such as <strong>Moz Pro<\/strong>, <strong>MixPanels<\/strong>, <strong>KISSmetrics<\/strong> and <strong>Adobe Analytics<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-36929\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/06\/adv.jpg\" alt=\"adv\" width=\"591\" height=\"190\" \/><\/p>\n<p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/strong><span style=\"text-decoration: underline;\"><strong>Fig 1. Advantages and Disadvantages of Google Analytics Reporting<\/strong><\/span><\/p>\n<p>So to recap, here we discussed how we can implement automated result of Google Analytics using Google Analytics Add-ons which contains a Magic Script that is run via Google Spreadsheet, and how to utilize your Google Analytics Core Reporting query with the provided input.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Analytics is a freely available web analytics tool offered by Google that tracks and reports website traffic. It is one of the most commonly used web analytics service on the Internet. Google Analytics provide immediate feedback through a dashboard in a language that our stakeholders understand. \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 [&hellip;]<\/p>\n","protected":false},"author":737,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":10},"categories":[1816],"tags":[1561,14,3641,171],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/36913"}],"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\/737"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=36913"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/36913\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=36913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=36913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=36913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}