> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hunch.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Analytics

> Connect your Google Analytics account to Hunch

This guide will help you securely connect your Google Analytics account to Hunch using Google Cloud Platform Service Account in just a few minutes.

***

## ✅ What You'll Need

* **Google Account** with access to Google Analytics
* **Google Analytics Property ID**
* **Google Cloud Platform Service Account**

***

## 1️⃣ Prepare Your Google Account

1. Make sure you have a Google account with access to Google Analytics

2. Ensure you have the necessary permissions to access Google Analytics data

3. **Find your Google Analytics Property ID**:

   * Open Google Analytics in your browser
   * In the left sidebar, click on **⚙️ Admin**
   * Under the **Property** column, select **Property details**
   * Your Property ID will be displayed in the top right corner of the page

   {" "}

   <img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-property-id.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=e5311d1129c9235ccbbf993b5b2e944c" alt="Google Analytics Property ID" className="w-full rounded-lg shadow-lg my-4" width="3140" height="1858" data-path="public/images/ga4-integration/google-analytics-property-id.png" />

4. Create a Google Service Account:

   * Go to **Google Cloud Platform Console** > **IAM & Admin** > **Service Accounts**

   * Click **+ CREATE SERVICE ACCOUNT**

     <img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/shared/gcp-create-sa-button.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=88d7f70c955bcd22d1543ab39815b4f5" alt="GCP Create Service Account Button" className="w-full rounded-lg shadow-lg my-4" width="1698" height="904" data-path="public/images/shared/gcp-create-sa-button.png" />

   * Enter a name for your service account (e.g., "hunch-integration")

   * Click **CREATE AND CONTINUE**

     <img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/shared/gcp-sa-name.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=b0e3f506b721398b9c9c15b241b082de" alt="GCP Service Account Name" className="w-full rounded-lg shadow-lg my-4" width="2154" height="1318" data-path="public/images/shared/gcp-sa-name.png" />

   * Click **CONTINUE** and then **DONE**

5. Generate and download the service account key:

   * Find your new service account in the list

   * Click the three dots menu (⋮) > **Manage keys**

     <img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/shared/gcp-sa-manage-keys.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=e3d6aae18ff81b8a2239ef6a2ae14720" alt="GCP Service Account Manage Keys" className="w-full rounded-lg shadow-lg my-4" width="3458" height="1382" data-path="public/images/shared/gcp-sa-manage-keys.png" />

   * Click **ADD KEY** > **Create new key**

   * Choose **JSON** format

   * Click **CREATE** to download the key file

   * Keep this file secure - you'll need it for the next steps

     <img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/shared/gcp-sa-create-key.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=4b3c7e18090d1e58d1b4070a6bd3e589" alt="GCP Service Account Create Key" className="w-full rounded-lg shadow-lg my-4" width="3496" height="1382" data-path="public/images/shared/gcp-sa-create-key.png" />

   [For more details, see Google Cloud Platform documentation -->](https://cloud.google.com/iam/docs/service-accounts-create#console)

6. Provide Google Analytics with permissions to your Service Account:

   * Open Google Analytics in your browser

   * In the left sidebar, click on **⚙️ Admin**

   * Under the **Property** column, click **Property Access Management**

     <img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-permissions-option.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=893669a47fa161d38849b2733326df6c" alt="Google Analytics Permissions Option" className="w-full rounded-lg shadow-lg my-4" width="2494" height="2080" data-path="public/images/ga4-integration/google-analytics-permissions-option.png" />

   * Click on the ➕ button > Click on **Add users**
     <img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-add-user.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=857904b00f0f6e8efffbb874c7bdad5f" alt="Google Analytics Add User" className="w-full rounded-lg shadow-lg my-4" width="3592" height="2070" data-path="public/images/ga4-integration/google-analytics-add-user.png" />

   * Enter your Service Account email (it ends with `.iam.gserviceaccount.com`)

   * Uncheck **Notify new users by email**

   * Select the **Viewer** role

   * Click **Add**
     <img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-add-user-form.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=885da6d8618d059f1c3c6dc040d6382b" alt="Google Analytics Add User Form" className="w-full rounded-lg shadow-lg my-4" width="3592" height="2070" data-path="public/images/ga4-integration/google-analytics-add-user-form.png" />

7. Enable the Google Analytics Data API:

   * Go back to the Google Cloud Console
   * Search for "Google Analytics Data API" in the search bar
   * Click on the **Google Analytics Data API** result
   * Click **Enable**

     <img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-enable-api.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=3662e0f631b5e2f91b5bd9a86d8a9e67" alt="Google Analytics Data API Enable" className="w-full rounded-lg shadow-lg my-4" width="3414" height="1368" data-path="public/images/ga4-integration/google-analytics-enable-api.png" />

***

## 2️⃣ Connect Google Analytics to Hunch

1. Log into [Hunch.dev](https://app.hunch.dev/login)
2. Click on your organization name > **Connect Data**

<img src="https://mintcdn.com/hunch-ac9ddd82/8-JWcEs7ZydEJuN2/public/images/shared/platform-connect-data.png?fit=max&auto=format&n=8-JWcEs7ZydEJuN2&q=85&s=b99e941c687a6833d004f27f16613f71" alt="Platform Settings" className="w-full rounded-lg shadow-lg my-4" width="2856" height="1354" data-path="public/images/shared/platform-connect-data.png" />

3. Click **Configure** on the Google Analytics row

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-platform-integration.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=174a45e09748b57ff111db5c105060c1" alt="BigQuery Integration" className="w-full rounded-lg shadow-lg my-4" width="3592" height="2070" data-path="public/images/ga4-integration/google-analytics-platform-integration.png" />

4. Open the Service Account key file from step 1.5, copy its content and paste it under the **Google Analytics Service Account JSON key** field

{" "}

<img src="https://mintcdn.com/hunch-ac9ddd82/HjVSL8mgxMQv8Txo/public/images/ga4-integration/google-analytics-platform-form.png?fit=max&auto=format&n=HjVSL8mgxMQv8Txo&q=85&s=0fe2dcf67271b0971071f1d0e493ecdf" alt="BigQuery Credentials Form" className="w-full rounded-lg shadow-lg my-4" width="3592" height="2070" data-path="public/images/ga4-integration/google-analytics-platform-form.png" />

5. Click **Submit**

***

## 🎉 Done! You're now connected

Need help? Ping us at [support@hunch.dev](mailto:support@hunch.dev)

***

## 🔒 Security Note

> Hunch uses Google Service Account keys for secure access to your Google Analytics data. Your credentials are encrypted and stored securely.
