Overview
Google has deprecated Universal Analytics. All new data is collected in Google Analytics 4 (GA4). Etlworks supports GA4 through the official Google Analytics Data API and no longer recommends using older APIs unless required for legacy use cases.
When to Use
Use this connector to extract analytics data from GA4 properties and load it into a destination such as a database, file, or API.
To learn how to create a data integration flow for GA4, refer to:
Extract data from Google Analytics and load into any destination
Create a Connection for GA4
1. Go to Connections.
2. Click +, search for Google Analytics, and select Google Analytics 4.
3. Choose your authentication method (OAuth2 or Service Account).
Authentication
You can authenticate using either OAuth2 (default) or a Google Service Account.
OAuth2 Authentication
-
Select OAuth2 as the authentication type.
-
Click Sign in with Google to authorize access.
Service Account Authentication
-
Select Service Account as the authentication type.
-
Share access to the GA4 property with the service account email:
etl-framework@api-project-201080624425.iam.gserviceaccount.com
-
Or enter your own service account credentials if you prefer to use a custom one.
Note: If using a service account, make sure to add the service account email to your GA4 property’s User Management section.
More on connecting to Google Services
Connection Parameters for GA4
-
Property ID: Numeric ID of the GA4 property (e.g., 123456789).
-
Realtime: Enable if you want to retrieve realtime event data (last 30 minutes). Note that only a limited set of metrics and dimensions are supported.
-
Dimensions Filter Builder: Optional JavaScript code that builds a filter expression for dimensions.
-
Metrics Filter Builder: Optional JavaScript code that builds a filter expression for metrics.
-
Dimensions: Comma-separated list of GA4 dimensions (e.g., city,deviceCategory). Use the names exactly as shown in Google’s Dimensions and Metrics Explorer.
-
Metrics: Comma-separated list of GA4 metrics (e.g., activeUsers,sessions).
-
Limit: Maximum number of rows to return. Default is 10,000. Max allowed by API is 100,000.
Optional:
-
Start Date / End Date: Use YYYY-MM-DD format or relative values like yesterday, today, 7daysAgo.
-
Timeout: Request timeout in minutes (default: 3).
-
Number of Retries: How many times to retry on failure (default: 0, max: 10).
-
Delay Between Retries: Milliseconds to wait between retries (default: 0, max: 300000).
Deprecated: Universal Analytics and User Activity API
Universal Analytics
Universal Analytics is no longer supported by Google. Legacy connections are still available but should be migrated to GA4. These connections used:
-
View ID and/or Web Property URL
-
Custom dimensions and metrics using the deprecated ga: prefix
User Activity API
Google’s User Activity API is only supported for Universal Analytics. It is not available for GA4.
If you still need to extract user-level data for legacy properties:
-
Use the Google Analytics User Activity connector.
-
Provide User ID, User ID Type, and View ID.
-
Same authentication options apply.
We do not recommend building new integrations using this API.
Comments
0 comments
Please sign in to leave a comment.