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
2. Enabling APIs
- Click Enable API at the top of the page
- You are redirected to the APIs Library
- Select the required API and open its Dashbaord. You can enable APIs for all supported services (BigQuery, Analytics, Calendar, Spreadsheet) in this single Project.
- Click Enable
3. Creating New Credentials
- Go to Credentials on the left side panel
- Click Create credentials and select OAuth client ID from the drop-down list
3.1. Create Client ID
- Select Web Application
- Enter a meaningful name
- 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:
NOTE: This value is referenced by Metric Insights at Admin > Utilities > Config variables GOOGLE_OAUTH2_REDIRECT_URI.
4. Store the client ID credentials on the Metric Insights server via Config Variables
- Modify the lines above inserting values obtained from Google for your host: GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET
- 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.