Skip to main content

Google Analytics Source Connector

The Google Analytics source connector in DataSync lets you retrieve data from Google Analytics for loading or synchronizing in your data warehouse. Before you start, you must have a Google account and create the required API project, enable services, and configure OAuth consent in the Google Cloud Console.

After creating all required source connections, configure your destination source to complete the connection setup.

important

You must authenticate with the same Google account used to create the API project in order to load data.

Configure Google Cloud API settings

Create a project

  1. Log in to the Google Cloud Console.
  2. Sign in with your Google account.
  3. Under Enabled APIs & services, click Create project.
  4. Enter a project name and select the location.
  5. Click Create.

Enable APIs

  1. Select your project.
  2. Click + Enable APIs and services.
  3. In the search bar, enter Google Analytics and press Enter.
  4. Select Google Analytics API and click Enable.
  5. In the search bar, enter Google Drive and press Enter.
  6. Select Google Drive API and click Enable.
  1. Select the hamburger icon in the upper-left corner to open the navigation menu.
  2. Under Products, select APIs & Services, then OAuth consent screen.
  3. Click Get started.
  4. Enter the app name and user support email, then click Next.
  5. Select External and click Next.
  6. Enter your email address and click Next.
  7. Agree to the Google API Services policy and click Create.
  8. In the navigation panel, select Branding.
  9. Enter an application name to help identify it.
  10. Under Authorized domains, click + Add domain and enter your DataSync server domain and company domain.
  11. Click Save.
  12. In the navigation panel, select Data Access.
  13. Click Add or remove scopes to define the permissions for this application.

Create an OAuth client ID

  1. Select the hamburger icon in the upper-left corner to open the navigation menu.
  2. Under Products, select APIs & Services, then Credentials.
  3. Click + Create Credentials, then select OAuth Client ID.
  4. In Application type, select Web application.
  5. Enter a name for the application.
  6. Click Create.
  7. Copy the client secret and client ID from the confirmation dialog.
  8. Click Ok to close.

Create a source connection in DataSync

  1. Log in to DataSync.
  2. From the welcome screen, select Connections.
  3. Next to Source Connections, click New.
  4. Select Google Analytics.
  5. In the Connection Properties panel, enter the connection properties.
  6. Copy the Callback URL from the Connection Properties panel.
  7. Log back in to the Google Cloud Console.
  8. From the navigation menu, go to APIs & Services and Credentials.
  9. Under your OAuth client entry, in Authorized redirect URIs, click + Add URI.
  10. Paste the Callback URL and click Save.
  11. (Optional) In the Additional Connection Properties panel, select Add property and enter the parameters for each property.
  12. In the Advanced Settings panel, configure the settings, including the Tracking Type and other values according to your requirements.
  13. Click Save.
  14. You will be redirected to a Google sign-in screen to authenticate. Sign in with the account used to create the API project, then click Allow to finish.

Parameters

Connection properties

ParameterDescription
DescriptionUnique name for the connection. Example: Google Analytics
Callback URLUnique URL generated in DataSync that must be authorized in your Google Cloud project's Authorized redirect URIs list.
Client IDIdentifier for your OAuth client, available in the Google Cloud Console under Credentials.
Example: 1234567890-abc.apps.googleusercontent.com
Client SecretSecret key for your OAuth client, available in the Google Cloud Console under Credentials.
Example: XyZ123_ABCD
Verbosity
  • 1 – Log queries, row counts, execution start/end, errors.
  • 2 – Includes level 1 plus cache queries, HTTP headers.
  • 3 – Includes level 2 plus request/response bodies.
  • 4 – Includes level 3 plus transport-level communication.
  • 5 – Includes level 4 plus all interface commands.
Pool idle timeoutMaximum idle time for connections before returning them to the pool, in seconds.
Max Pool SizeMaximum number of connections allowed in the pool.
Pool wait timeMaximum wait time for connection allocation before error is thrown, in seconds.

Additional connection properties

Additional connection string properties not specified in the Connection Properties panel. For each property added, you can choose Visible or Encrypted. Selecting Encrypted hides the value from the interface and stores it encrypted in the back end, such as when defining passwords.

ParameterDescription
PropertyConnection string property that defines the action or behavior. Example: ReadOnly
ValueValue for the property. Example: True
TypeVisibility of the property: Visible or Encrypted.

Advanced settings

Advanced settings control how the Google Analytics connector tracks changes, handles regional and time configuration, and processes data batches during extraction. These options allow fine‑tuning for performance and accuracy, and should be configured according to your system environment and operational requirements.

SettingDescription
Tracking TypeMethod for tracking changes: None or Date.
RegionRegion setting for the connector, if required by your setup.
Time ZoneTime zone matching the Google Analytics application server.
Time OffsetRefresh offset in seconds to compensate for timing issues in record selection. Minimum value is 0; maximum is 3600 seconds.
Batch SizeQuantity of records processed in each batch during extraction. Larger batch sizes increase memory usage but can improve performance up to a point. The default value is 2000 and the maximum should not exceed 10000 records. Adjust according to your network speed and disk performance; in most cases the default (2000) works best.

Example