- Goto Google Developer Console
- Make New Project
- Enable Analytics API
- In Credentials Menu item create new Service Account with P12 option
- Download P12 file and copy Email Address that Service Account give you
- Goto Google Analytics Account
- Create New property for your site
- In Analytics panel in ACCOUNT Column Click User Management Paste Email Address that Service Account get us and click add
- 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
I'm not sure this is updated or not i used this 4 years ago.