Before you start
- Your GA4 property ID. In GA4, go to Admin > Property Settings. Lens wants the numeric ID, for example
123456789, not theG-measurement ID. - Access for TagPipes. Lens reads GA4 through the TagPipes service account. Add that account to your GA4 property as a Viewer (Admin > Property access management). Your TagPipes contact can give you the account's email address.
- A plan for history. The GA4 Data API is the right path for up to 400 days. For deeper history, use a BigQuery source on your GA4 BigQuery export instead.
On Configure > Data Tables, Recommended Setups has a GA4 Data API card that creates the standard GA4 tables in one step. Use the steps below for a custom table.
Create the table
- Go to Configure > Data Tables, click + New Table, and choose Google Analytics 4.
- Enter a Table Name and the GA4 Property ID.
- Leave Google Connection on None (use default service account).
Pick dimensions and metrics
Use the Dimensions and Metrics pickers. Add takes any API name, including custom ones such as customEvent:plan_type, and Browse lists the custom dimensions and metrics registered on your property.
dateis added for you. To get hourly data, adddateHourinstead; the table is then hourly and stored in UTC.- GA4 accepts at most 9 dimensions (including the date) and 10 metrics per request. Lens does not stop you from choosing more, but a sync over those limits fails.
- Field names are stored exactly as GA4 spells them, for example
sessionDefaultChannelGroup.
Click Validate Selections. It checks your choices against the property and catches typos, custom dimensions that are not registered, and duplicate aliases before they break a sync.
GA4 rates such as bounceRate or engagementRate are summed like any other number if you store them as metrics, which gives wrong totals. Store the counts and define the rate as a Ratio Metric instead. User metrics such as totalUsers are unique per day, so summing them across days overstates the total.
Filter what you pull (optional)
Under Filters, click + Add Filter to keep only matching rows. Filters are sent to GA4, so filtered-out rows are never pulled. All filters must match (AND).
| Operator | Matches |
|---|---|
| EXACT, NOT_EXACT | The whole value |
| CONTAINS, NOT_CONTAINS | Part of the value |
| BEGINS_WITH, ENDS_WITH | Start or end of the value |
| REGEXP | A regular expression that must match the whole value. To match part of it, wrap the pattern: .*(signup).* |
Matching is not case-sensitive.
Set the date range and sync mode
| Setting | Default | Notes |
|---|---|---|
| Backfill Period | Last 30 days | Presets plus Other for an exact number of days. The maximum is 400 days; longer presets in the list fail on save |
| Incremental Refresh Window | 7 days | Days re-pulled on every sync after the first. Widen it to 14 or 28 if recent conversions keep changing. Cannot exceed the backfill |
| Sync Mode | Incremental | Full Refresh wipes and reloads the whole backfill on every run |
| Sync Schedule | Daily | Daily suits GA4, whose data settles over about 48 hours |
Click Create Table. When the first sync starts, Lens shows how many 30-day chunks it will pull and a rough duration.
How GA4 syncs work
- History is pulled in 30-day chunks. A long backfill on a busy property can take hours.
- Syncs end at yesterday (UTC). Today's partial data is never pulled.
- Each incremental sync clears its rolling window, then pulls it again. If GA4 returns an error part-way, those days stay empty until the next successful sync.
- Rows that GA4 buckets as
(other)or(not set)for the date are skipped. - The table is stored in your TagPipes property's time zone. When the table uses a Google connection, Lens reads the GA4 property's own reporting time zone instead. Keep the two the same so days line up. See Dates and Time Zones.
Check it worked
Open the table. When the status reads active, open the data view and compare one day's total for a simple metric, such as sessions, with the same day in GA4 Explore. Small differences on the most recent days usually disappear once GA4 finishes processing them.
Troubleshooting
The sync fails with a permission or 403 error
TagPipes does not have access to the property. Check that the TagPipes service account is a Viewer on the GA4 property and that the property ID is the numeric one.
Save is refused for the backfill
The backfill is over 400 days. Use Other to enter 400 or less, or move the deep history to a BigQuery source.
The sync fails with a field error
A dimension or metric name is wrong, not registered, or not compatible with the others. Click Validate Selections to find it. Also check you are within 9 dimensions and 10 metrics.
The sync seems stuck
Large backfills are slow but keep moving. If nothing changes for over an hour, use Reset Sync Status on the table page; a running GA4 sync stops at its next chunk. Then click Sync Now.