Configuring Google analytics

In This Guide

To integrate Google Analytics with Brightspot, you must have a Google Analytics account and a Google API Service account, both of which generate values that you need to configure Brightspot.

Creating a Google Analytics account

  1. Create a Google Analytics account as described in Get started with Analytics.
  2. In your Google Analytics account, make the following settings:
    1. Tracking ID, for example UA-118898499-1
    2. View ID, for example 174965383

Creating a Google API service account

  1. Create a service account on the Google APIs site
  2. Create credentials using a service account key that is a JSON key type. The key is downloaded as a JSON file.

Adding the Google Analytics Integration

To add the Google Analytics Integration to Brightspot:

  1. Click menu > Admin > Sites & Settings.
  2. In the Sites widget, select a site to integrate with Google Analytics, or select Global to integrate all your sites.
  3. Under Integrations, click add_circle_outline at the top of the page, and select Google Analytics from the list of choices.
  4. In the Tracking ID field, enter the tracking ID you assigned as described in the section Creating a Google Analytics account.

    The tracking ID generates a JavaScript snippet that is incorporated into your site pages. The snippet enables tracking of your site by Google Analytics.

  5. Click Save.

To configure your Brightspot site to retrieve Google Analytics information, see Configuring a site to retrieve Google Analytics.

Configuring a site to retrieve Google Analytics

To configure a Brightspot site to retrieve Google Analytics:

  1. Click menu > Admin > Sites & Settings.
  2. In the Sites widget, select a site to integrate with Google Analytics.
    If you only have one set of credentials for your Google Analytics account, you can set those credentials under the Global site and they will cascade down to all of your other sites. The value in the Credentials field is the only value that cascades down to your other sites. You must still enter the View ID and remaining settings for each site that you want to retrieve Google Analytics.
  3. Under Integrations, scroll to, and expand, Google Analytics .
  4. Using the following table as a reference, enter settings for the Google Analytics plugin.
    Google analytics integration
  5. Click Save.
  6. Click Integrations > Google.
  7. Validate the task host for the GoogleAnalyticsProcessTask is set in the Task Host field on the Global site. (Only Brightspot Enterprise users have access to this field.)
    The Task Host field must be formatted in the following manner:



    master.job.service.<tenant>.<project>.internal (Only if your project has a dedicated job host.)
  8. Grant your Service Account access to read from the Google Analytics account.
    1. Go to and log in.
    2. Go to Google Analytics > Admin > Property Access Management
    3. Click the (+) at the upper right corner of the screen to add a user.
    4. Copy the service account email generated by Google when you set up your service account.
    5. Paste the service account email and add the Read & Analyze permission.
    6. Click Add on the upper right corner to save the configuration.

Google Analytics settings—Integrations tab

Metrics To DisplayExpand the Metrics To Display field to select a metric you want to have displayed in the Edit Page Analytics widget. To add additional metrics, clickadd_circle_outlineand select the additional metrics you want to add. If you don’t select any metrics, all of them are displayed in the Edit Page Analytics widget.

Private JSON key that was downloaded from the Google API service account as described in Creating a Google API service account. Copy the entire contents of the file into this field, including the opening and closing braces. You can set the Credentials at the Global site level and have that value cascade down to all of your other sites, or you can enter unique credentials for each site if you have multiple Google Analytics credentials you use. Credentials entered at the site level always supersede those entered at the Global level.

For example, you would use different credentials if your organization has different GCP Service Accounts with access to different GA Accounts/Views.

View IDID of the view that was generated in your Google Analytics account as described in Creating a Google Analytics account. You can configure your account to have multiple views, each with a different set of data.
Import Time ZoneSet the time zone for your data import. This setting must match the time zone of the same View as specified in the View ID field above.
Page ReportEnabling this setting allows the import of page views data, at the per-page level, from Google Analytics.
Site ReportsType of reports to generate about traffic to your site:
  • Device categories—Indicates types of devices visitors are using on your site.
  • Demographics—Provides gender and age brackets.
  • Referrals—Indicates how visitors arrive at your site, such as referral traffic from other sites or clicking links in search engines.
  • Visits—Provides general information about site visits, such as number of sessions, users, and session duration.
Analytics Import Task ScheduleSet the interval that you want the analytics data imported from the Google Analytics API. This information is entered as a chron expression. For example, entering 0 15,45 * * * ? * would run every hour at 15 and 45 after the hour. This setting is only available on the Global site.
Historical Days to ImportEnter the number of days to enter historical data. The default value for this field is 30 (days). This setting is only available on the Global site.