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
You will need:
- A published bot
- A Google Analytics account
- A GA4 property with at least one data stream
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.
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:
- 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-.
Your Google Analytics integration is ready. You can use the integration’s Cards to interact with your data stream.
Cards
Track Event
Track event in Google Analytics
inputobjectTrack Node
Tracks when a node has been triggered, recording it as a page view in Google Analytics.
inputobjectUpdate User Profile
Updates the User's profile in Google Analytics
inputobject