Post on 11-Jun-2020
transcript
Create Open Data withGoogle AnalyticsOpen Data Day 2019
3/2/2019
Introduction
2
“Edmonton is experiencing transformative growth, and we believe the tools and resources Grow with Google offers will help citizens throughout the area develop new skills and grow their businesses.”https://events.withgoogle.com/join-google-in-edmonton-alberta/faqs/
Grow with Google
3
https://grow.google/intl/ALL_ca/
Outline1. Analyze data with Google Analytics2. Visualize data with Data Studio3. Export data with Google Sheets Add-On4. Automate with Google Apps Script
4
1. Analyze Datawith Google Analytics
5
Google Analytics Demo Accounthttps://analytics.google.com/analytics/web/demoAccount
6
Google Analytics Reports
7
Example Report: Device CategoryAudience > Mobile > Overview
8
Edit GA ReportExample: Change date range
9
Visualize GA ReportSelect dimension(s) > Plot Rows
10
Edit GA ReportExample: Add Secondary dimension
11
Export GA Report
12
2. Visualize Datawith Data Studio
13
Data Studiohttps://datastudio.google.com/data
14
Authorize Google Analytics
15
Connect to Google AnalyticsDemo Account > Google Merch. Store > Master View
16
Create Data Studio Report
17
Customize Report: Add Chart
18
Example Chart: Device Category
DATATime Dimension
= Month of YearBreakdown Dimension
= Device CategoryMetric
= Sessions
19
Edit DS ReportExample: Add date range
20
Filter ChartAdd Filter > Create Filter > Save
21
View DS Report
22
Download DS Report
23
3. Export Datawith Google Sheets Add-On
24
Get Google Sheets Add-Ons
25
Select Google Analytics Add-On
26
Create New ReportAdd-ons > Google Analytics > Create new report
27
Account = Demo AccountProperty = Google Merch. StoreView = Master View
Metrics = Users, SessionsDimensions = Device Category, Browser, Operating System
Create Report
28
Start Date = 2018-01-01End Date = 2018-12-31
Order = -ga:users
Spreadsheet URL = copy the url of the current spreadsheet
Configuration Options
29
https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters
Configuration Options: Filters
30
Example:ga:deviceCategory==desktop
Configuration Options: Filters
31
Run Report(s)Add-ons > Google Analytics > Run reports
32
Schedule ReportsAdd-ons > Google Analytics > Schedule reports
33
Schedule Reports Settings
34
Export ReportsFile > Download as
35
4. Automatewith Google Apps Script
36
New > More > Connect more apps
Connect Apps to Drive
37
Filter or search Apps > Connect
Find Google Apps Script
38
New > More > Google Apps Script
Create GAS Project
39
Create GAS Project in SheetsTools > Script editor
40
Write Script to Create Chart
41
Debug & Run Script• Save script• Select function• Click bug icon to debug• Click the play icon to run
42
Copy & Edit Script File
43
Edit Script File
44
Create Custom Menu
45
Add Trigger
46
Run function = onOpenEvent source = From spreadsheetEvent type = On open
Edit Trigger Settings
47
Wrap-Up
48
ResourcesGoogle Apps Help• Analytics: https://support.google.com/docs/topic/9054603• Sheets: https://support.google.com/docs/topic/9054603
Scripts Tutorials• GAS: https://developers.google.com/apps-
script/articles/tutorials• Codecademy – JavaScript:
https://www.codecademy.com/learn/introduction-to-javascript• W3schools – JavaScript: https://www.w3schools.com/js/
49
Sam HamiltonWeb Services LibrarianEdmonton Public LibrarySam.Hamilton@epl.ca
Open Data Teamopendata@epl.ca
Thank You!
50