Last active
August 29, 2015 13:58
-
-
Save mppatterson/9934762 to your computer and use it in GitHub Desktop.
How to Connect to Google Analytics API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Login to the Google account which has access to your analytics | |
Create an OAuth key on https://console.developers.google.com/ | |
Store the keyfile in your app (and add it to gitignore) | |
Add your "[email protected]" account to Google Analytics as a "Read & Analyze" user | |
Use the code from https://developers.google.com/analytics/solutions/articles/hello-analytics-api to get started | |
Use a service object instead of OAuth redirect (see: https://gist.github.com/mppatterson/9934981) | |
Full sample (in PHP) at: https://gist.github.com/mppatterson/9934917 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment