-
Click 'Create Project'
-
Enable 'Analytics API'
- Create an ‘OAuth 2.0 client IDs’ (Application type is Other)
-
Go to Google Analytics account: http://www.google.com/analytics/
-
Add user email to GA permission.
- Go to Query Explore to test: https://ga-dev-tools.appspot.com/query-explorer/
Notes: Get PROFILE_ID from ids: ga:xxxxxxxxx
-
Samples: analytics.rb