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

# Google Analytics

You can use the Google Analytics connector from the CData Sync application to capture data
from Google Analytics and move it to any supported destination. To do so, you need to add
the connector, authenticate to the connector, and complete your connection.

## Add the Google Analytics Connector

To enable Sync to use data from Google Analytics, you first must add the
connector, as follows:

<ol>
  <li>Open the **Connections** page of the Sync dashboard.</li>
  <li>Click **Add Connection** to open the **Select Connectors** page.</li>
  <li>Click the **Sources** tab and locate
  the **Google Analytics** row.</li>

  <li>
    Click the **Configure Connection** icon at the end of that row to open
    the **New Connection** page. This action opens the
    **Add Connection** dialog.

    **Note:** If the **Configure Connection** icon is not
    available, click the **Download Connector** icon to install
    the Google Analytics connector.
  </li>

  <li>Enter a name for your connection in the **Add Connection** dialog.</li>
  <li>Click **Add** to open the **Settings** tab for your connector.</li>
</ol>

For more information about installing new connectors, see
[Connections](https://docs.sync.cdata.com/26.4/en/connections/connections.md).

## Authenticate to Google Analytics

After you add the connector, you need to set the required properties.

CData Sync supports authenticating to Google Analytics in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

* [**OAuth**](#oauth) (default)
* [**OAuth JWT**](#oauth-jwt)
* [**GCP Instance Account**](#gcp-instance-account)

### OAuth

CData Sync provides an embedded OAuth application with which to connect. To use the application, select **OAuth** for **Auth Scheme**. No additional properties are required.

### OAuth JWT

To connect with a Google Analytics account, specify the following properties:

<ul><li>**Auth Scheme:** Select **OAuthJWT**.</li>
<li>**OAuth Client Id:** Enter the client Id that you were assigned when you registered your application with an OAuth authorization server.</li>
<li>**OAuth Client Secret:** Enter the client secret that you were assigned when you registered your application with an OAuth authorization server.</li>
<li>**Scope:** Enter the scope of your access to the application.</li>
<li>**OAuth JWT Cert:** Enter your Java web tokens (JWT) certificate store.</li>
<li>**OAuth JWT Cert Type:** Enter the type of key store that contains your JWT certificate. The default type is **PEMKEY\_BLOB**.</li>
<li>**OAuth JWT Issuer:** Enter the issuer of your Java web token. Typically, the issuer is either the client Id or the email address of the OAuth application.</li>
<li>(Optional) **OAuth JWT Cert Subject:** Enter the subject of your OAuth JWT certificate.</li>
<li>(Optional) **OAuth JWT Subject:** Enter the user subject for which the application is requesting delegated access.</li>
<li>(Optional) **OAuth JWT Subject Type:** Select the subject type (**enterprise** or **user**) for the JWT authentication. The default type is **enterprise**.</li>
<li>(Optional) **OAuth JWT Public Key Id:** Enter the Id of the public key for JWT.</li></ul>

### GCP Instance Account

When you run CData Sync on a GCP virtual machine, Sync can authenticate by using the service account that is tied to the virtual machine. Select **GCPInstanceAccount** for **Auth Scheme** to use that account. No additional properties are required.

## Complete Your Connection

To complete your connection:

1. For **Schema**, select the type of schema that you want to use:
   * **UniversalAnalytics:** For this schema, specify the following properties:
     * (Optional) **Profile:** Enter your Google Analytics profile (view).
     * **Api Version:** Select the API version that you want to use with Universal Analytics.
   * (Default) **GoogleAnalytics4:** This schema includes the **Property Id** property (optional). For **Property Id**, specify the property identifier (Id) that you want to use when you query report views in the version 4 schema.
2. Define advanced connection settings on the **Advanced** tab. (In most cases, though, you should not need these settings.)
3. If you authenticate with OAuth, click **Connect to Google Analytics** to connect to your Google Analytics account.
4. Click **Create & Test** to create your connection.

## More Information

For more information about interactions between CData Sync and Google Analytics, see
[Google Analytics Connector for CData Sync](https://cdn.cdata.com/help/DAN/synch/default.htm).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.