Skip to main content

Connection Setup

Step 1: Create a Service Account within your GCP project

Create a Service Account

1
2
On the sidebar, choose IAM & Admin > Service Accounts.
4
Fill up the Service account details and click “Done”.
GCP service account creation form with account details

Generate a private key for your service account

2
Click the Service Account you created from the previous step.
3
Click the “KEYS” tab.
4
Click “ADD KEY” > “Create new key” > “JSON” and click “CREATE”.
5
A private key (JSON) file will be automatically downloaded to your machine.
JSON private key download dialog for the service account

Step 2: Enable the APIs

Step 3: Grant Google Analytics 4 Property Access to Service Account

1
Navigate to Google Analytics and click the “Admin” cog in the left sidebar.
2
Ensure that you are in the correct Account and Property, and then click “Property Access Management”.
3
Click the blue + button to add access permissions to new users, and select “Add users”.
4
Paste the Service Account email address you created earlier. Deselect “Notify new users by email” and select “Viewer” and click “Create”.

Step 4: Create GA4 Connection on Integrate.io ETL

1
Navigate to the Connections tab and click Google Analytics - GA4.
Connections tab showing available connection types
Selecting Google Analytics GA4 from the connection list
2
Fill up the Connection Name.
3
Upload the JSON key you generated from Step 1.
4
Click Test Connection and Create Connection.
GA4 connection form with name and JSON key upload
GA4 connection test successful with Create Connection button

Google Analytics 4 source component in the pipeline designer

Connection

Select an existing Google Analytics 4 (GA4) connection or create a new one.

Source Properties

GA4 source properties with API version, date range, and property IDs
  • Api Version - Select api version Google Analytics 4 API. See list of available APIs from Google here
  • Date range - Select a date range from the dropdown list of ranges. If you select custom date range..., you will be prompted to enter From date and To date. Click either inputs and select the dates from the calendar. You can also use variables as values for the custom date range in the format yyyy-MM-dd.
  • Include custom dimensions and metrics - Fetch list of custom dimensions and metrics from selected accounts and show it on tables of dimensions and metrics in schema section
  • Property IDs - Leave empty to read data for all accessible Google Analytics 4 properties or type in the IDs of your Google Analytics properties (or tables) in the form of properties/xxx. You can enter multiple ids separated by comma or use a variable too. Source Schema
Select the metrics and dimensions to use in the source. The source also includes pre-defined fields for the Google Analytics account name, property name, property id and account id. Data can be also previewed by clicking “Refresh” button.
GA4 source schema with metrics and dimensions selection

Report filters

Use report filters to have Google Analytics 4 return only the rows you need. GA4 applies the filters before it sends data to Integrate.io ETL. This is faster than reading the whole report and removing rows later with a Filter Transformation. The filters apply to both job runs and data preview. The source has two optional filters. GA4 returns only rows that match both.
  • Dimension filter - Filters rows by dimension values, such as country or pagePath.
  • Metric filter - Filters rows by metric values, such as sessions or totalRevenue. GA4 applies metric filters to the totals of each row, as grouped by the selected dimensions.

Set filters in the editor

The Filter report data (optional) step comes after Source properties and before field selection, so the data preview in the field step is already filtered.
1
In the Dimension filters or Metric filters section, click + Add condition.
2
Select a field, an operator, and enter a value. The field list contains only the dimensions or metrics of the selected properties.
3
Under Conditions, select whether rows must match all, any, or none of the conditions in that section.
Leave a section empty to skip it. Blank rows are ignored. A row with a missing field or value, or a non-numeric number, is listed under its table and keeps the component invalid. Metric values are numbers in the metric’s unit. Rates such as engagementRate are fractions, for example 0.5 for 50%. Durations are in seconds. You can also enter a package variable, such as $min_sessions. If a filter was set through the API with nested groups, the editor shows it as read-only. Integrate.io ETL still applies it when the job runs. Click Replace with new conditions to replace it with rows.

Filter format for the API

When you set filters through the API, each filter is a GA4 Data API FilterExpression in JSON format, stored in the dimension_filter and metric_filter fields. A filter expression contains exactly one of these keys:
  • filter - A single condition on one field. It contains a fieldName and exactly one condition.
  • andGroup - Rows must match all expressions in its non-empty expressions array.
  • orGroup - Rows must match at least one expression in its non-empty expressions array.
  • notExpression - Rows must not match the nested expression.

Conditions

Numeric values use either int64Value or doubleValue, for example {"int64Value": "100"}. Field names can be in API form (customEvent:plan) or schema form (customEvent_plan). Integrate.io ETL validates each filter when you save the package. If a filter is invalid, the error names the location of the problem, such as $.filter.stringFilter.matchType must be one of EXACT, BEGINS_WITH, ....

Examples

Dimension filter that keeps sessions from the United States or Canada on product pages:
Metric filter that keeps rows with more than 100 sessions:

Using variables in filters

You can use package variables in filter values with the $name syntax. For example, {"int64Value": "$min_sessions"} uses the value of the min_sessions variable. Integrate.io ETL validates numeric values that contain variables when the job runs, not when you save the package.
Integrate.io ETL replaces any $ followed by letters with a variable value. This applies inside regular expressions too. A $ at the end of a pattern, such as ^/blog/.*$, is not affected.

Limitations

  • A filter on a custom field, such as customEvent:plan, fails for any selected property that doesn’t have that field. This can happen when Property IDs is empty or lists several properties.
  • GA4’s emptyFilter condition is not supported.

Migrating from Universal Analytics to Google Analytics 4 (GA4)

For metrics and dimensions mapping, please visit GA4 migration guide here
Last modified on October 7, 2026