Calling Google Analytics Realtime API from PHP

This article describes how to call the Google Analytics API via PHP.

1. Create a new project in the Google Developers Console (https://console.developers.google.com) and make sure the (realtime) analytics API is turned on. At the credentials page, create a new Client ID. This will generate a Client ID, Email address and a public key fingerprints. Afterwards generate a P12 key. This will also download the key file. I stored in the root of my Laravel project. Continue reading Calling Google Analytics Realtime API from PHP