Welcome to the GA4 Agents workshop! Follow the steps below to get your environment set up and ready to run.
First, authenticate with Google Cloud to get your required access token.
gcloud auth application-default login
gcloud auth application-default print-access-token
To proceed, you'll need to upload the Simple GA4 Agent.json
file to Langflow. Without this, the agents won’t work properly.
You can either:
- Upload the JSON to your own instance of Langflow (Preferred)
- Duplicate the Langflow space: Langflow GA4 Agent
Ensure you set up both the openai_api_key
and bigquery_api_key
in the appropriate fields. The bigquery_api_key
can be obtained by running:
gcloud auth application-default login
gcloud auth application-default print-access-token
Each Analyst Agent represents a large language model (LLM) that processes instructions, creates, and runs SQL queries on BigQuery. The model will understand and process the output and even suggest queries to run next.
Feel free to experiment with the prompts, edit the agents, and add more by:
-
Ungrouping an agent
-
Making your changes
-
Regrouping the agent
You can also run the agents on your own BigQuery dataset instead of the public eCommerce one, enabling you to automate insights from your Google Analytics.