Google Analytics

Add a bot to Google Analytics using the official integration.

The official Google Analytics integration allows your bot to interact with your GA4 data stream.

Setup

Install the integration in Botpress

First, install the integration to your bot:

  1. In Botpress Studio, select Explore Hub in the upper-right corner.
  2. Search for the Google Analytics integration.
  3. Select Install Integration.

In the Configuration menu, you should see two fields:

  • Measurement ID: The Measurement ID for your Google Analytics 4 property
  • API secret: The API Secret for your Google Analytics 4 property

Leave these empty for now—you’ll come back to them after completing the setup in Google Analytics.

Get your measurement ID

Next, get your GA4 measurement ID:

  1. Log in to Google Analytics.
  2. In the bottom-left corner, select Admin.
  3. Under Property settings > Data collection and modification, select Data streams.
  4. Select the data stream you want to interact with.
  5. Copy its Measurement ID. It should start with G-.

Get your API secret

Now, get your GA4 API secret:

  1. In the same data stream menu, select Measurement protocal API secrets.
  2. If you haven’t reviewed the terms yet, select Review terms.
  3. Select Create and give the secret a nickname.
  4. Copy the secret’s value.

Configure the integration in Botpress

Now, you can finish setting up the integration in Botpress:

  1. In the Measurement ID field, paste the ID you copied earlier.
  2. In the API secret field, paste the secret you copied earlier.
  3. Select Save Configuration.

Cards

Track Event

Track event in Google Analytics

inputobject

Track Node

Tracks when a node has been triggered, recording it as a page view in Google Analytics.

inputobject

Update User Profile

Updates the User's profile in Google Analytics

inputobject

Triggers