SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Ad hoc YouTube Analytics with Google Apps Script
Ad Hoc Analysis with Apps Script 
and YouTube Analytics API 
Arun Nagarajan, Apps Script Developer Advocate, Google 
Christoph Schwab-Ganser, YouTube Analytics API Lead, Google
1 billion viewers!
Petabytes of analytics...
PSiamckpaligfye,, aauuttoommaattee,, sshhaarree
Agenda 
● Google Apps Script 
● YouTube Analytics 
● YouTube Analytics API 
● YouTube Analytics API + Google Apps Script 
Do more with YouTube Analytics
What is Google Apps Script? 
script.google.com
What is Google Apps Script
Apps Script Example 
Export Gmail messages to Google Docs
Google Apps Script 
Google Products 
Calendar 
Charts 
Contacts 
Drive 
Documents 
Domain 
Finance 
Gmail 
Groups 
Language 
Maps 
Sites 
Spreadsheets 
Communication and UI 
Content 
Html 
Jdbc 
Mail 
Soap 
Ui 
UrlFetch 
Xml 
Utilities 
Base 
Cache 
Lock 
Properties 
Script 
ScriptDb 
Utilities 
● Write code in browser 
● Run code on Google servers 
● Integrate with other systems
What is YouTube Analytics? 
youtube.com/analytics
Helping YouTube Creators in Making Decisions 
● Collect user events of all YouTube videos 
● Aggregate them up to the level of channels, 
partners, and shows 
● Provide UI for owners www.youtube.com/analytics
What is the YouTube Analytics API? 
● Enable developers to provide services for YouTube 
channels and partners 
● Allow partners to customize and integrate their video 
reporting 
● Public API based on same pre-aggregated data as UI 
● Requires precise queries: Give me views and likes of 
video XYZ over the last 30 days 
● Requests must be authorized by the owner using 
OAuth2 
● Account Types: YouTube Channels and Partners
How to Drill into the Data? 
● Dimensions, Metrics, Filters, and Report 
● Dimensions: Criteria to group the data 
● Day the event occurred 
● Country the event originated from 
● Metrics: Measurement of user activity 
● User viewing a video 
● User subscribing to your channel 
● Filters: Limit the data included in the computation 
● Only events from Italy 
● Only playbacks from embedded player 
● Report: Combination of Dimensions, Metrics, and 
Filters 
● Metrics: views, likes 
Dimension: day 
Filter: channel==XYZ
Check Documentation developers.google. 
com/youtube/analytics 
API Explorer 
● Channel level: Basic metrics 
Need a Sample?
More Details on the YouTube Analytics API?
YouTube Analytics + Apps Script
Turn data into applications and UI 
{ JSON 
"kind": "youtubeAnalytics#resultTable", 
"columnHeaders": [ 
{ 
"name": "day", 
"columnType": "DIMENSION", 
"dataType": "STRING" 
}, 
... 
], 
"rows": [ 
[ "2013-03-30", 876036, 7 ], 
[ "2013-03-29", 173666, 2 ], 
[ "2013-03-28", 273552, 4 ], 
... 
] 
}
Do more with YouTube Analytics 
Using Google Apps Script 
Build 
Share 
Automate 
Integrate
Build - Load data into spreadsheet 
● Invoke Apps Script function via Menu or "button" 
● Create new tabs or append to current spreadsheet 
● Formatting capability 
● Pre-defined reports or dynamic inputs
Share - Custom analytics 
● Turn tabular data into charts with 2 clicks 
● Build charts dynamically using ChartBuilder API 
● Allows business users to view data without full access 
● Publish as gadget in Google Sites 
● Simple layer on to restrict access to full data
Automate - Get alerts on interesting events 
● Apps Script functions can be scheduled 
● Store previous run settings 
● Compare arbitrary data points against thresholds 
● Send email or create calendar events for alerts
Integrate - YouTube Analytics + Other sources 
● Co-relate YouTube data with other systems 
● Twitter - simple example to check trending info 
● Weather 
● Stock Market 
● Holiday calendar 
● Other internal events?
Do more with YouTube Analytics 
Using Google Apps Script 
Build - reports by enabling data into Google Sheets 
Share - via Google Sites or push email messages 
Automate - schedule scripts to check and notify of insights 
Integrate - with other analytics and data sources
Technical details 
● UrlFetch 
● Access 3rd party APIs via standard HTTP 
● Learn more at - https://developers.google.com/apps-script/reference/url-fetch/ 
● OAuth 2 
● Apps Script allows for scripts to be deployed as Web Apps - required for OAuth 2 callback 
● Learn more at - http://youtu.be/VVhsK5jH6u8 
● Triggers 
● Allow for Apps Script functions to be run at specified interval 
● Have full access to Apps Script API (Gmail, Sheets, Drive, etc.) 
● Learn more at - https://developers.google.com/apps-script/execution_time_triggers 
● Quota Management 
● All Google accounts have access to Apps Script services 
● Google Apps for Business accounts have increased quota 
● Learn more at - https://script.google.com/dashboard
Get started! 
● script.google.com 
● github.com/entaq/GoogleAppsScript 
● developers.google.com/youtube/analytics 
● developers.google.com/apps-script 
● stackoverflow.com/questions/tagged/youtube-api 
● stackoverflow.com/questions/tagged/google-apps-script 
Arun Nagarajan - google.com/+ArunNagarajan 
Christoph Schwab-Ganser -google.com/+ChristophGanser
Ad hoc YouTube Analytics with Google Apps Script

Más contenido relacionado

Más de Arun Nagarajan

Google Maps on iOS with Swift
Google Maps on iOS with SwiftGoogle Maps on iOS with Swift
Google Maps on iOS with SwiftArun Nagarajan
 
Battery Efficient Location Services
Battery Efficient Location ServicesBattery Efficient Location Services
Battery Efficient Location ServicesArun Nagarajan
 
CheckMark - Code the Deal hackathon
CheckMark - Code the Deal hackathonCheckMark - Code the Deal hackathon
CheckMark - Code the Deal hackathonArun Nagarajan
 
Mongo DB Hackday Apr 28 2012
Mongo DB Hackday Apr 28 2012Mongo DB Hackday Apr 28 2012
Mongo DB Hackday Apr 28 2012Arun Nagarajan
 
Integrate Google Drive with Google Apps Script
Integrate Google Drive with Google Apps ScriptIntegrate Google Drive with Google Apps Script
Integrate Google Drive with Google Apps ScriptArun Nagarajan
 
Android L Preview - Recents Screen + API
Android L Preview  - Recents Screen + APIAndroid L Preview  - Recents Screen + API
Android L Preview - Recents Screen + APIArun Nagarajan
 
node.js on Google Compute Engine
node.js on Google Compute Enginenode.js on Google Compute Engine
node.js on Google Compute EngineArun Nagarajan
 

Más de Arun Nagarajan (9)

Google Maps on iOS with Swift
Google Maps on iOS with SwiftGoogle Maps on iOS with Swift
Google Maps on iOS with Swift
 
Animations & swift
Animations & swiftAnimations & swift
Animations & swift
 
Battery Efficient Location Services
Battery Efficient Location ServicesBattery Efficient Location Services
Battery Efficient Location Services
 
CheckMark - Code the Deal hackathon
CheckMark - Code the Deal hackathonCheckMark - Code the Deal hackathon
CheckMark - Code the Deal hackathon
 
Mongo DB Hackday Apr 28 2012
Mongo DB Hackday Apr 28 2012Mongo DB Hackday Apr 28 2012
Mongo DB Hackday Apr 28 2012
 
Integrate Google Drive with Google Apps Script
Integrate Google Drive with Google Apps ScriptIntegrate Google Drive with Google Apps Script
Integrate Google Drive with Google Apps Script
 
Android L Preview - Recents Screen + API
Android L Preview  - Recents Screen + APIAndroid L Preview  - Recents Screen + API
Android L Preview - Recents Screen + API
 
CloudKit
CloudKitCloudKit
CloudKit
 
node.js on Google Compute Engine
node.js on Google Compute Enginenode.js on Google Compute Engine
node.js on Google Compute Engine
 

Último

Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 

Último (20)

Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 

Ad hoc YouTube Analytics with Google Apps Script

  • 2. Ad Hoc Analysis with Apps Script and YouTube Analytics API Arun Nagarajan, Apps Script Developer Advocate, Google Christoph Schwab-Ganser, YouTube Analytics API Lead, Google
  • 6. Agenda ● Google Apps Script ● YouTube Analytics ● YouTube Analytics API ● YouTube Analytics API + Google Apps Script Do more with YouTube Analytics
  • 7. What is Google Apps Script? script.google.com
  • 8. What is Google Apps Script
  • 9. Apps Script Example Export Gmail messages to Google Docs
  • 10. Google Apps Script Google Products Calendar Charts Contacts Drive Documents Domain Finance Gmail Groups Language Maps Sites Spreadsheets Communication and UI Content Html Jdbc Mail Soap Ui UrlFetch Xml Utilities Base Cache Lock Properties Script ScriptDb Utilities ● Write code in browser ● Run code on Google servers ● Integrate with other systems
  • 11. What is YouTube Analytics? youtube.com/analytics
  • 12. Helping YouTube Creators in Making Decisions ● Collect user events of all YouTube videos ● Aggregate them up to the level of channels, partners, and shows ● Provide UI for owners www.youtube.com/analytics
  • 13. What is the YouTube Analytics API? ● Enable developers to provide services for YouTube channels and partners ● Allow partners to customize and integrate their video reporting ● Public API based on same pre-aggregated data as UI ● Requires precise queries: Give me views and likes of video XYZ over the last 30 days ● Requests must be authorized by the owner using OAuth2 ● Account Types: YouTube Channels and Partners
  • 14. How to Drill into the Data? ● Dimensions, Metrics, Filters, and Report ● Dimensions: Criteria to group the data ● Day the event occurred ● Country the event originated from ● Metrics: Measurement of user activity ● User viewing a video ● User subscribing to your channel ● Filters: Limit the data included in the computation ● Only events from Italy ● Only playbacks from embedded player ● Report: Combination of Dimensions, Metrics, and Filters ● Metrics: views, likes Dimension: day Filter: channel==XYZ
  • 15. Check Documentation developers.google. com/youtube/analytics API Explorer ● Channel level: Basic metrics Need a Sample?
  • 16. More Details on the YouTube Analytics API?
  • 17. YouTube Analytics + Apps Script
  • 18. Turn data into applications and UI { JSON "kind": "youtubeAnalytics#resultTable", "columnHeaders": [ { "name": "day", "columnType": "DIMENSION", "dataType": "STRING" }, ... ], "rows": [ [ "2013-03-30", 876036, 7 ], [ "2013-03-29", 173666, 2 ], [ "2013-03-28", 273552, 4 ], ... ] }
  • 19. Do more with YouTube Analytics Using Google Apps Script Build Share Automate Integrate
  • 20. Build - Load data into spreadsheet ● Invoke Apps Script function via Menu or "button" ● Create new tabs or append to current spreadsheet ● Formatting capability ● Pre-defined reports or dynamic inputs
  • 21. Share - Custom analytics ● Turn tabular data into charts with 2 clicks ● Build charts dynamically using ChartBuilder API ● Allows business users to view data without full access ● Publish as gadget in Google Sites ● Simple layer on to restrict access to full data
  • 22. Automate - Get alerts on interesting events ● Apps Script functions can be scheduled ● Store previous run settings ● Compare arbitrary data points against thresholds ● Send email or create calendar events for alerts
  • 23. Integrate - YouTube Analytics + Other sources ● Co-relate YouTube data with other systems ● Twitter - simple example to check trending info ● Weather ● Stock Market ● Holiday calendar ● Other internal events?
  • 24. Do more with YouTube Analytics Using Google Apps Script Build - reports by enabling data into Google Sheets Share - via Google Sites or push email messages Automate - schedule scripts to check and notify of insights Integrate - with other analytics and data sources
  • 25. Technical details ● UrlFetch ● Access 3rd party APIs via standard HTTP ● Learn more at - https://developers.google.com/apps-script/reference/url-fetch/ ● OAuth 2 ● Apps Script allows for scripts to be deployed as Web Apps - required for OAuth 2 callback ● Learn more at - http://youtu.be/VVhsK5jH6u8 ● Triggers ● Allow for Apps Script functions to be run at specified interval ● Have full access to Apps Script API (Gmail, Sheets, Drive, etc.) ● Learn more at - https://developers.google.com/apps-script/execution_time_triggers ● Quota Management ● All Google accounts have access to Apps Script services ● Google Apps for Business accounts have increased quota ● Learn more at - https://script.google.com/dashboard
  • 26. Get started! ● script.google.com ● github.com/entaq/GoogleAppsScript ● developers.google.com/youtube/analytics ● developers.google.com/apps-script ● stackoverflow.com/questions/tagged/youtube-api ● stackoverflow.com/questions/tagged/google-apps-script Arun Nagarajan - google.com/+ArunNagarajan Christoph Schwab-Ganser -google.com/+ChristophGanser