The API Key is only needed once per web application
Visit the Easy Setup Tool Google API Setup Tool *
* Note: If you don't visit the Easy Setup tool you will need to create a project that has access to Analytics API
Select Create Project (or select an existing project)
Then Click Go To Credentials
Select Analytics API for "which API you will be using?"
Then Select "Web Server" as the answer to "Where you will be calling the api from?".
Select "User data" to the question "What data will you be accessing?"
Click "What credentials do I Need?"
Name the credential.
Leave the AUTHORIZED JAVASCRIPT ORIGINS blank
Set the AUTHORIZED REDIRECT URIS to the following 4 sets of URIs (it is advised to only use https for production sites)
http://concrete5.domain/index.php/ga_popular_pages/auth
http://concrete5.domain/ga_popular_pages/auth
https://concrete5.domain/index.php/ga_popular_pages/auth
https://concrete5.domain/ga_popular_pages/auth
Click Create Client ID
Enter Product Name such as "GA Popular Pages" *
* You can also enter extra information that will be displayed on the Oauth2.0 Consent Screen under more Customization Options (not necessary)
Click continue
Click Download to save the file as client_secret.json.
Click Done.