Google Analytics (GA4) plugin

For more information about what this plugin does and the data streams it retrieves, see:

Google Analytics

How to add the data source

To add a data source click on the + next to Data Sources on the left-hand menu in SquaredUp. Search for the data source and click on it to open the Configure data source page.

There are two Google Analytics data sources, this article covers the v4 version which is most frequently referred to as GA4. Users are being forced from UA to the newer GA4 with UA being end-of-life mid-2023.

See Google Analytics UA plugin.

Before you start

In the GCP console select your project and ensure that the following are enabled:

  • Google Analytics Data API
  • Google Analytics Admin API are enabled

GCP Service Account Configuration

  1. Create a new Service Account, or edit an existing account.
    See GCP - Creating and managing service accounts.
  2. Ensure the account has the role Viewer by adding the role Basic > Viewer.
    See GCP - Grant a single role.
  3. Create a new key for the Service Account using the key type JSON. Download the JSON file as you will need to copy information from this JSON file when adding the data source next.
    See GCP - Creating service account keys .

    Make sure to store the key file securely, because it can be used to authenticate as your service account.

Configuring the data source

  1. Open the JSON file that you downloaded when creating the key.
  2. Copy and paste the clientEmail from the JSON file into the data source form.
  3. Copy and paste the private_key from the JSON file into the data source form (everything between the quotes).
  4. Optionally, select whether you would like to restrict access to this data source instance. By default, restricted access is set to off.

  5. Click Add.

    You can also add a data source from Settings > Data Sources > Add data source, but sample dashboards are not added when using this method.

Using the Google Analytics GA4 data streams

Creating data streams

The data source will index the Google Analytics accounts and the properties which belong to them.

Currently all data streams require that at least one Properties item be scoped to produce data. Once scoped the user will have the choice of a couple built-in data streams as well as two configurable data streams details below.

The GA4 Query Explorer can be helpful for looking up metrics and dimensions.

Data streams

The following data streams are installed with this plugin.

Was this article helpful?


Have more questions or facing an issue?