Setup
You will need:
- A published bot
- A Google Analytics account
- A GA4 property with at least one data stream
1
Install the integration in Botpress
First, install the integration to your bot:
- In Botpress Studio, select Explore Hub in the upper-right corner.
- Search for the Google Analytics integration.
- Select Install Integration.
- Measurement ID: The Measurement ID for your Google Analytics 4 property
- API secret: The API Secret for your Google Analytics 4 property
2
Get your measurement ID
Next, get your GA4 measurement ID:
- Log in to Google Analytics.
- In the bottom-left corner, select Admin.
- Under Property settings > Data collection and modification, select Data streams.
- Select the data stream you want to interact with.
- Copy its Measurement ID. It should start with
G-
.
3
Get your API secret
Now, get your GA4 API secret:
- In the same data stream menu, select Measurement protocal API secrets.
- If you haven’t reviewed the terms yet, select Review terms.
- Select Create and give the secret a nickname.
- Copy the secret’s value.
4
Configure the integration in Botpress
Now, you can finish setting up the integration in Botpress:
- In the Measurement ID field, paste the ID you copied earlier.
- In the API secret field, paste the secret you copied earlier.
- Select Save Configuration.
Your Google Analytics integration is ready. You can use the integration’s Cards to interact with your data stream.