start faster with google analytics api

17
digmato.com | @appeltauer Start faster with Google Analytics API Roman Appeltauer Web Analytics consultant digmato.com Prague September 12th 2015

Upload: roman-appeltauer

Post on 19-Feb-2017

1.290 views

Category:

Internet


2 download

TRANSCRIPT

Page 2: Start faster with Google Analytics API

digmato.com | @appeltauer

Automation

Wikipedia: The biggest benefit of automation is that it saves labor, however, it is also used to save energy and materials and to improve quality, accuracy and precision.

Page 3: Start faster with Google Analytics API

digmato.com | @appeltauer

Automation in web Analytics

• Save time on doing basic stuff again and again and again and...

• Analysts should do things that actually add value

• Make less errors (you would be surprised)

• Check more (facts|often|details) than you would manually

Page 4: Start faster with Google Analytics API

digmato.com | @appeltauer

Google Analytics APIhttps://youtu.be/V3d1rJacww4

Page 5: Start faster with Google Analytics API

digmato.com | @appeltauer

Choose development method• Choose API method (https://developers.google.com/identity/protocols/OAuth2)

• JavaScript - great for simple dashboards (Embed API)

• Web Server app - more complex, may work while you are offline

• Or consider ready solutions

• GA Spreadsheet Add-on, or in library

• Find an open source app

Page 6: Start faster with Google Analytics API

digmato.com | @appeltauer

Register your Project• Register and set up Project (https://console.developers.google.com/project)

• Each Project has it's own Credentials Choose OAuth 2.0 client ID

• Activate Google Analytics API

Page 7: Start faster with Google Analytics API

digmato.com | @appeltauer

Download Google API library• Choose your preferred technology

• Some libraries are in Beta, but work well ;-)

• The library contains all availale APIs, not just Google Analytics

• Start with bundled examples and make very simple app in minutes

• https://developers.google.com/discovery/libraries

Page 8: Start faster with Google Analytics API

digmato.com | @appeltauer

Hello Analytics API: First steps

• Start on Core Reporting API guides page

• Find your technology e.g. PHP Quickstarts

• You'll get guided through example code

• Don't forget to paste Project Credentials (as shown before)

Page 9: Start faster with Google Analytics API

digmato.com | @appeltauer

Check rich resources• Very helpful Official documentation

• Reporting APIs

• Configuration APIs

• Check Demos and Tools (https://ga-dev-tools.appspot.com)

• Implementation guides

Page 10: Start faster with Google Analytics API

digmato.com | @appeltauer

Who is your app for?• You'll save a lot of time if your app is for closed group of users

• 80% of DIGMATO.com code deals with specifics

• Account selectors - tailor made app may hardcode many custom settings

• Insufficient user permissions - you know what rights your app needs

• Visualization of results - smart tables, colors, progress bars

• Validation of finished user request - reality checks, finish on back-end

• Handling Google Analytics API error responses - retry, log, notify user if needed

Page 11: Start faster with Google Analytics API

digmato.com | @appeltauer

Limitations• 50 000 calls a day - ok for most apps

• 500 management writes a day - bad e.g. for Referral SPAM tools

• Rate limit up to 10 hits per second read (1 hit/s write)

• Quota usage monitoring in Developers Console

Page 12: Start faster with Google Analytics API

digmato.com | @appeltauer

Make sure you create the right thing

Page 13: Start faster with Google Analytics API

digmato.com | @appeltauer

Never automate what you can't do manually

• The app will break - you just don't know when (API changes, server and browser updates)

• You might have no backup solution if the app breaks

• You need to be able to improvise when data breaks (wrong UTM params, change in URLs, bug in tracking code)

• You'll need to drill down manually when numbers get interesting

• It will take too much time and you'll never be sure if it works.

Page 14: Start faster with Google Analytics API

digmato.com | @appeltauer

Don't reinvent the wheel

• Tailor made functionality saves most of the time

• Common features pay back when used very often (or by many people)

• Ready apps are great for most use-cases and first steps

• Don't duplicate Google Analytics features without adding value

Page 15: Start faster with Google Analytics API

digmato.com | @appeltauer

Don't create app you won't need

• App for one-time use is wasting of your time

• Prioritize features you'll use often enough

• Likely there's an app for that and costs much less than your time

Page 16: Start faster with Google Analytics API

digmato.com | @appeltauer

Create apps for others

• Give marketers the data they need - it's worth it!

• Easy-to-get data lead to more actionable insights

• It's more fun to make life easier for others

Page 17: Start faster with Google Analytics API

digmato.com | @appeltauer

Thank you!Roman Appeltauer https://digmato.com

[email protected] @appeltauer