Spotfire® Server and Environment - Installation and Administration

Configuring the Google Analytics and Google BigQuery connectors

To be able to use the Google Analytics and Google BigQuery connectors in Spotfire web clients, you must add OAuth credentials from your Google Cloud Platform project to the web player service configuration.

About this task

For detailed instructions, see the topic 'Enabling Google connectors in Spotfire web clients' in your version of the Spotfire Analyst User Guide.

Procedure

  1. In the Google API console, create OAuth credentials for Spotfire in your Google project. In the OAuth credentials, add your Spotfire Server as a Redirect URI:
    https://<spotfire_server>/spotfire/wp/oauth2/code
    Note: For more information about configuring your Google Cloud Platform project, see the official documentation from Google.
  2. Then, in your web player service configuration, add your OAuth credentials Client ID and Client Secret in the <Spotfire.Dxp.Data.Adapters.GoogleCommon.Properties.Settings> settings in the Spotfire.Dxp.Worker.Host.exe.config file (Spotfire.Dxp.Worker.Host.dll.config file for services installations on Linux).
    <Spotfire.Dxp.Data.Adapters.GoogleCommon.Properties.Settings>
          <setting name="ClientId" serializeAs="String">
            <value>My Client ID</value>
          </setting>
          <setting name="ClientSecret" serializeAs="String">
            <value>My Client Secret</value>
          </setting>
    </Spotfire.Dxp.Data.Adapters.GoogleCommon.Properties.Settings>

    Defining a local redirect address template

    When connecting to Google data sources with OAuth authentication, the HTTP listener that is started by the Spotfire Analyst client uses localhost. If your users do not have access to localhost you need to set a preference to change the address that is used by the client.

    To solve this problem, you can set the LocalRedirectAddressTemplate preference in the Administration Manager. This preference serves as a local redirect address template and can be used to redirect OAuth responses to a custom address instead of localhost:

    http://127.0.0.1:{0}/authorize/code

    The {0} will be replaced by a port number that you set in the LocalRedirectPorts preference. If you do not specify any port number there, the {0} will be replaced by a generated one.

    Important: If you do not allow access to localhost for the OAuth2 response and you do not set the LocalRedirectAddressTemplate preference, you cannot connect to Google BigQuery or Google Analytics from Spotfire Analyst.