Getting Client_Secret.json

 

Do you have a Google Analytics API Account and Credentials?

 

No Google Analytics API Key or Credentials. 

  1. The API Key is only needed once per web application 

  2. 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

  3. Select Create Project (or select an existing project)

  4. Then Click Go To Credentials

  5. Select Analytics API for "which API you will be using?"

  6. Then Select "Web Server" as the answer to  "Where you will be calling the api from?".

  7. Select "User data" to the question "What data will you be accessing?"

  8. Click "What credentials do I Need?"

  9. Name the credential.

  10. Leave the AUTHORIZED JAVASCRIPT ORIGINS blank

  11. 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

  12. Click Create Client ID

  13. 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)

  14. Click continue

  15. Click Download to save the file as client_secret.json.

  16. Click Done.

Google Analytics API Account but no credentials

  1. Go to the Google Developer Console
  2. Select the project that has the Analytics API Account
  3. Click on credentials
  4. Click Create Credentials and select Oauth Client ID
  5. Then Select Web Application as the type
  6. Name the credential.
  7. Leave the AUTHORIZED JAVASCRIPT ORIGINS blank
  8. 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
  9. Click Create 

  10. You will be presented with your client secret and client id you can write these down and enter them manually into GA Popular Pages or Download Credentials

A Google Analytics API Account and Credentials.

  1. Go to the Google Developer Console
  2. Select the project that has the Analytics API Account
  3. Click on credentials
  4. Find the credential that you set up earlier.
  5. Click on the Download button to save the file as client_secret.json.
  6. Upload to your /packages/ga_popular_pages/code folder or upload during installation.