---
title: Create a Google Analytics Raw Data connection
description: Learn how to create a Google Analytics Raw Data connection in Catalog Explorer that stores authentication details for Lakeflow Connect ingestion.
canonical_url: https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/google-analytics-connection
---

# Create a Google Analytics Raw Data connection

Create a Google Analytics Raw Data connection in Catalog Explorer to store authentication credentials for Lakeflow Connect ingestion. Any user with the `USE CONNECTION` privilege on the connection can then create Google Analytics ingestion pipelines without needing direct access to the credentials.

Alternatively, admin users can create a connection and a pipeline at the same time in the data ingestion UI. See [Create an ingestion pipeline](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/google-analytics-pipeline.md).

For privilege requirements, see [Connect to managed ingestion sources](https://docs.databricks.com/gcp/en/connect/managed-ingestion.md).

The following authentication methods are supported:

* U2M OAuth (recommended)
* Service account authentication using a JSON key (in the UI, this is called **Username and password**)

> [!NOTE]
>
> Parallel fetching, which improves ingestion throughput for large tables, is only supported when the connection uses service account JSON authentication. Connections that use U2M OAuth fetch data in a single Spark task rather than distributing the fetch across multiple parallel tasks. If ingestion throughput is a priority, use service account authentication.

## Prerequisites

For service account authentication, complete the [source setup](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/google-analytics-source-setup.md). Use the authentication details you obtain to create the connection.

## Create a connection

### U2M OAuth

1. In the Databricks workspace, click **Catalog > External locations > Connections > Create connection**.
2. On the **Connection basics** page of the **Set up connection** wizard, specify a unique **Connection name**.
3. In the **Connection type** drop-down menu, select **Google Analytics Raw Data**.
4. In the **Auth type** drop-down menu, select **OAuth**.
5. (Optional) Add a comment.
6. Click **Next**.
7. On the **Authentication** page, click **Sign in to Google** and sign in with your Google account credentials.
8. At the prompt to allow Lakeflow Connect to access your Google account, click **Allow**.
9. After you're redirected back to the Databricks workspace, click **Create connection**.

### Service account

1. In the Databricks workspace, click **Catalog > External locations > Connections > Create connection**.
2. On the **Connection basics** page of the **Set up connection** wizard, specify a unique **Connection name**.
3. In the **Connection type** drop-down menu, select **Google Analytics Raw Data**.
4. In the **Auth type** drop-down menu, select **Username and password**.
5. (Optional) Add a comment.
6. Click **Next**.
7. On the **Authentication** page, enter the Google service account key from the source setup in JSON format.
8. Click **Create connection**.

## Next steps

[Create an ingestion pipeline](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/google-analytics-pipeline.md).
