Bika
GuideAI Agent

Google Analytics Skillset

The Google Analytics Skillset connects to your Google Analytics account, allowing the AI agent to access your website data and generate analysis reports.

Google Analytics Skillset Guide

Table of Contents

Overview

illustration of Google Analytics skillset

The Google Analytics Skillset is a collection of tools connected to your Google Analytics account. By enabling this skillset, the AI agent can access your website data through Google Analytics and generate analytical reports, making it easier for you to understand your website behavior.

The current skillset includes the following skills:

  • Get Custom Report: Customizable Google Analytics reports where you can specify metrics and dimensions to get custom Google Analytics reports (metrics and dimensions can be specified)
    • Parameter Description:
      • propertyId (required): Google Analytics Property ID (e.g.: 42XXXXX01)
      • startDate (required): Start date (format: YYYY-MM-DD)
      • endDate (required): End date (format: YYYY-MM-DD)
      • dimensions (optional): Query dimensions (e.g.: country, city, pagePath, sessionSource)
      • metrics (required): Query metrics (e.g.: activeUsers, active1DayUsers, active7DayUsers, active28DayUsers)
      • limit (optional): Limit the number of results, default is 50

📌 Tip: For more dimensions and metrics, please refer to the Google Analytics API documentation.

  • Get Active Users Data: Get active user data (1 day, 7 days, 28 days)
    • Parameter Description:
      • propertyId (required): Google Analytics Property ID (e.g.: 42XXXXX01)
      • startDate (required): Start date (format: YYYY-MM-DD)
      • endDate (required): End date (format: YYYY-MM-DD)
      • limit (optional): Limit the number of results, default is 50

Setup

The Google Analytics Skillset relies on Google Cloud service account credentials (Google Credentials). Please follow the steps below to configure:

Step 1: Get Google Analytics Credentials

  1. Visit the Google Cloud Console and sign in or create an account.

  2. Create a new project or select an existing one.

  3. Enable the Analytics Data API:

    • In the Google Cloud Console, go to "APIs & Services" > "Library"
    • Search for "Analytics Data API"
    • Click it and press "Enable" Search GA Library Enable GA API
  4. Create a service account:

    • Go to "IAM & Admin" > "Service Accounts"
    • Click "Create Service Account"
    • Give it a name, such as "bika-analytics", then click "Create"
    • Assign the "Viewer" role, click "Continue" then "Done" Create Service Account Assign Role
  5. Create and download credentials:

    • Click your new service account
    • Go to the "Keys" tab
    • Click "Add Key" > "Create new key"
    • Choose "JSON" and click "Create"
    • Save the downloaded JSON file securely Create Key Key Options JSON Key
  6. Grant permissions in Google Analytics:

    • Go to Google Analytics
    • Click "Admin" (gear icon)
    • Select the account containing the property whose data you want to access
    • Under the "Account" section, select "Account Access Management"
    • Click the "+" button and add the service account email (from the client_email field in the JSON file)
    • Assign "Viewer" permissions Add User
  7. Get your Google Analytics Property ID:

    • In Google Analytics, click "Admin" (gear icon)
    • Select "Property" > "Property details"
    • Copy the "PROPERTY ID: 42XXXXX01" for use later in conversations with AI or in prompts (see step 2 for example). Property Settings

Step 2: Configure the Skillset

  1. Return to the Google Analytics skillset configuration page in Bika.
  2. Paste the entire JSON credential content into the Google Credentials field.
  3. Click Connect to complete the credential configuration.
  4. Enter the Property ID in the System Prompt, or enter the Property ID directly during conversation. Enter the Property ID

⚠️ If the setup process feels complex, you can also refer to the Google Analytics Agent template documentation for more detailed operation examples.

Step 3: Enable Required Skills

  • On the skillset configuration page, enable the required functions via toggle switches
  • Multiple skills can be enabled simultaneously
  • Click Save to take effect Configure Required Skills

Usage Examples

1) Get Report

Have the AI generate a custom analytics report:

Example prompt: "View total users"

Total Users metrics: totalUsers is the total number of users. Telling the AI directly can avoid potential errors, which depends on the LLM's understanding of Google Analytics.

Example prompt: "Analyze page views and sessions by country for the past month"

Analyze Page Views and Sessions metrics: screenPageViews, sessions

📌 Tips:

  • Property ID: Unique identifier, such as 42XXXXX01, can be specified in the prompt.
  • dimensions: e.g., country, date, city, adUnitName.
  • metrics: e.g., sessions, screenPageViews, activeUsers, totalUsers.
  • For more dimensions and metrics, please refer to the Google Analytics API documentation.

2) Get Active Users Data

Have the AI fetch user activity metrics:

Example prompt: "Show active user count"

Show Active User Count

Q&A

Q: What should I do if the connection fails? A: Check if the JSON was pasted completely, if extra symbols were added, or if the service account email has been configured with permissions.

Q: What should I do if the function is unavailable? A: Confirm that the corresponding skill has been enabled and saved on the configuration page.

Q: What should I do if the call is restricted? A: Google Analytics API has rate limits. Too many requests may trigger restrictions; try again later.

Recommend AI Automation Templates
AI Writer
Tell me about the AI product or brand — I’ll draft engaging marketing copy, articles, and social media posts tailored to your brand voice and product details, complete with relevant links and illustrations.
Automated Stock Data Retrieval (JavaScript)
Automated Stock Data Retrieval (JavaScript)
The Automated Stock Data Retrieval (JavaScript) template automatically fetches US stock data every day and writes it into a structured table, giving you clean, consistent time series for analysis. Use it as part of your financial data automation stack to power stock trend analysis, dashboards, alerts, and quantitative analysis data for models and backtests. Designed for financial analysts, investment managers, data scientists, quants, and portfolio managers, it saves time on manual data collection so you can focus on research, strategy, and better investment decisions.
Discourse Community Manager
Discourse Community Manager Agent is an AI community assistant that helps you quickly generate clear, friendly, and well-structured replies to user posts. This AI reply generator makes community moderation easier, faster, and more professional.
Automated Currency Data Retrieval (JavaScript)
Automated Currency Data Retrieval (JavaScript)
The Automated Currency Data Retrieval (JavaScript) template runs daily jobs to fetch exchange rates and write them into a table, giving you clean, structured historical exchange rate data without manual copy‑paste. Use it for financial data automation that feeds dashboards, alerts, and automated financial reporting, so finance teams, forex traders, accountants, and analysts always have up‑to‑date FX data. Over time, the template becomes a lightweight risk management tool by helping you monitor currency movements, spot trends, and support better investment and hedging decisions.
Google Analyst
Step-by-step guide to connect your Google Analytics 4 (GA4) property to the Google Analyst agent. Covers creating a Google Cloud service account, enabling the Analytics Data API, granting GA4 Viewer access, and configuring the agent with supported metrics like sessions, users, bounce rate, conversions, and more. Perfect for quickly setting up GA4 data reporting in Bika.ai
OKR Tracker & Quarterly Report Automation
OKR Tracker & Quarterly Report Automation
Streamline your goal management and team performance tracking with the OKR Tracker & Quarterly Report Automation template. Automate OKR reporting, monitor progress through the OKR dashboard, generate quarterly performance reviews, and keep your team aligned with real-time work progress tracking and automated reports. Perfect for team leaders, project managers, and enterprises aiming to improve efficiency and achieve objectives seamlessly.