Skip to content

Instantly share code, notes, and snippets.

@amirkhiz
Created January 6, 2019 14:55
Show Gist options
  • Save amirkhiz/c4490c891c6882d00c04b678bde5c184 to your computer and use it in GitHub Desktop.
Save amirkhiz/c4490c891c6882d00c04b678bde5c184 to your computer and use it in GitHub Desktop.
Use Google Analytics Api in PHP
  1. Goto Google Developer Console
  2. Make New Project
  3. Enable Analytics API
  4. In Credentials Menu item create new Service Account with P12 option
  5. Download P12 file and copy Email Address that Service Account give you
  6. Goto Google Analytics Account
  7. Create New property for your site
  8. In Analytics panel in ACCOUNT Column Click User Management Paste Email Address that Service Account get us and click add
  9. Copy 9 last digit of url in Analytics page of project and we will use it in Google Api Library

http://www.mustafaercel.com/2015/07/google-analytics-verilerini-php-ile-web-sayfamiza-cekelim-2015/ https://github.com/google/google-api-php-client

@amirkhiz
Copy link
Author

amirkhiz commented Jan 6, 2019

I'm not sure this is updated or not i used this 4 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment