17
Google Analytics Magic Script Created By: Keshav Kashyap

Google Analytics Report Automation (Magic Script)

Embed Size (px)

Citation preview

Page 1: Google Analytics Report Automation (Magic Script)

Google Analytics Magic ScriptCreated By: Keshav Kashyap

Page 2: Google Analytics Report Automation (Magic Script)

Agenda:-

What is Google Analytics?Why Google Analytics?How to use GA in ApplicationKey Features of GAAdvantages and DisadvantagesHow to setupMetrics and DimensionsAutomation of GASample Report & Demo

Page 3: Google Analytics Report Automation (Magic Script)

What is Google Analytics?Free Service Offered by Google for Website

Statistics.Daily, monthly, yearly tracking of web visits

Graphed over timeWhich pages they go to, how long they stay

Bounce rateEntrance pages

How they got thereSearch engines and Search terms used

Location, operating system, monitor resolution

Page 4: Google Analytics Report Automation (Magic Script)

How it works ? Sign up for Google Analytics

https://www.google.com/analytics/

They return code to you You paste the code just below the </body> tag Put it on EVERY page

Edit>Find and Replace is easiest option

Put it in your template pages, so it will be automatically on every page

Go to the Analytics dashboard page to see daily metrics

Page 5: Google Analytics Report Automation (Magic Script)

What it does?Daily, monthly, yearly tracking of web visits

Graphed over timeWhich pages they go to, how long they stay

Bounce rateEntrance pages

How they got thereSearch engines and Search terms used

Location, operating system, monitor resolution

Page 6: Google Analytics Report Automation (Magic Script)

Key Features of Google Analytics:- It helps in Website Trafficking.

Where the visitors came from?How they are navigating through site?

ConversionDownloadsPage ViewsRegistration

E-CommerceAd-Words Performance

Page 7: Google Analytics Report Automation (Magic Script)

Advantages :-

Free Sufficiant possibilities for most companies Easy to implement Easy to use Easy to understand

Page 8: Google Analytics Report Automation (Magic Script)

Dis-advantages :-

URL and title based No data history Privacy ? JavaScript and cookies Only visitors, no crawlers or bots

Page 9: Google Analytics Report Automation (Magic Script)

What is Google Analytics Report Automation?

Google Analytics Report Automation (Magic) is an integration that reduces the work required to put Google Analytics data into any Apps Script supported product, such as Google Docs, Sites, or Spreadsheets.

Page 10: Google Analytics Report Automation (Magic Script)

How Google Analytics Report Automation Works?

Create a Dashboard on Google Spreadsheet. Add Google Analytics Report Automation (Magic

Script) Turn on access to the APIs for your first time.

Looking at the tabs on top, Script Editor > Resources > Use Google APIs > Make sure Google Analytics API is on.

Script Editor > Resources > Use Google APIs > Click “Google APIs Console” > Turn Analytics API On > Agree to Terms.

Page 11: Google Analytics Report Automation (Magic Script)

How Google Analytics Report Automation Works?

Go to the “gaconfig” sheet and enter the profile number for a view you have access to. You can find the profile number either by: Going to the Google Analytics tab and choosing “Find profile / ids”

Bringing up a report in the Google Analytics interface in that specific view.

Go to “Dashboard” sheet and run “Get Data” from the Google Analytics tab.

Page 12: Google Analytics Report Automation (Magic Script)

Required Inputs or Query Parameter Details:-Account ID :- the (Magic) script comes with a ‘Find Profile/IDs’ option underneath the Google Analytics menu. ids =ga:12345Start Date/End Date (*required) : today()Metrics (*required) : ga:session,ga:bouncesDimension : ga:browser,ga:citySort : ga:countryFilter : ga:mediumMax Result :100Start and End Index : 10 to 100Output : Name of the Sheet

Page 13: Google Analytics Report Automation (Magic Script)

Some Sample Metrics and Dimensions :-

Dimensions Metricsga:hostnamega:pagePathga:pagePathLevel1ga:pagePathLevel2ga:pagePathLevel3ga:pagePathLevel4ga:pageTitlega:landingPagePathga:secondPagePathga:exitPagePathga:previousPagePathga:pageDepth

ga:pageValuega:entrancesga:entranceRatega:pageviewsga:pageviewsPerSessionga:uniquePageviewsga:timeOnPagega:avgTimeOnPagega:exitsga:exitRate

Page 14: Google Analytics Report Automation (Magic Script)

Sample Query Parameter :-query1 value1type coreids ga:80332348start-date 2/10/2014end-date 2/19/2014last-n-days metrics ga:visitsdimensions ga:datesort filters segment start-index max-results sheet-name App Sony PlayStation

Page 15: Google Analytics Report Automation (Magic Script)

Trigger your Script:-

Go to Add-ons. Select Google Analytics. Navigate to Schedule Reports.

Page 16: Google Analytics Report Automation (Magic Script)

Sample Report:-

Results for query query9 Date executed 5/4/2015 5:59:27 Profile Name WWE.comTotal Results Found 1 Total Results Returned 1 Contains Sampled Data FALSE Totals For All Results ga:visits ga:visitors

1480 1353 ga:visits ga:visitors

1480 1353

Page 17: Google Analytics Report Automation (Magic Script)