Help & DocumentationConnecting To Data Sources Sourcing Data from Google AnalyticsRegistering Your Server with Google to use their Plugin Resources

Registering Your Server with Google to use their Plugin Resources

To establish connectivity with Google Services (BigQuery, Analytics, Calendar, Spreadsheet), you first need to register with Google by creating an API Console Project and create a single Client ID that will serve as a basic identificator between any Google plugin and Metric Insights instance. The result allows you to obtain a client ID and secret code.  

Only one Google Project and one Web Client (credentials) are required to establish connectivity to ALL supported Google services (BigQuery, Analytics, Calendar, Spreadsheet) via plugins offered by Metric Insights.

NOTE: Despite the fact that only one account (where the  API Console Project was created) serves for establishing connection between Google and Metric Insights, other Google accounts can be used to create Data Sources for elements.

1. Google APIs Console

Go to:  https://console.developers.google.com

Select the API project or create a new one

2. Enabling APIs

  1. Click Enable API at the top of the page
  2. You are redirected to the APIs Library
  3. Select the required API and open its Dashbaord. You can enable APIs for all supported services (BigQuery, Analytics, Calendar, Spreadsheet) in this single Project.
  4. Click Enable

3. Creating New Credentials

  1. Go to Credentials on the left side panel
  2. Click Create credentials and select OAuth client ID from the drop-down list

3.1. Create Client ID

  1. Select Web Application
  2. Enter a meaningful name
  3. Enter Authorized JavaScript Origins.  Example: where the hostname is demo.metricinsights.com, the default is:
 https://demo.metricinsights.com 
  1. Enter Authorized Redirect URIs, enter /path/to/callback value as /editor/service/validategoogleoauth2  Example: where the hostname is demo.metricinsights.com, the full value becomes:
 https://demo.metricinsights.com/editor/service/validategoogleoauth2 

NOTE: This value is referenced by Metric Insights at Admin > Utilities > Config variables GOOGLE_OAUTH2_REDIRECT_URI.

3.2. Client ID and Secret Key are displayed

Client ID and Secret Key are displayed

Record values to input into Config Variables on your MI server

4. Store the client ID credentials on the Metric Insights server via Config Variables

  1. Modify the lines above inserting values obtained from Google for your host: GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET
  2. Commit changes

NOTE: Please note that any changes made in Config Variables will affect ALL users of Metric Insights. If the values for GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET have been previously specified and you are changing them, tokens obtained earlier will become invalid.

0 Comments

Add your comment

E-Mail me when someone replies to this comment