Skip to main content
The Google Analytics 4 live data source reads one GA4 property through the Google Analytics Data API. Each query is one report request, and Lightdash shows the results as they come back from Google. It’s a level 3 integration: its API runs reports from a fixed menu of dimensions and metrics.

Before you start

  • Live data sources enabled for your organization. See Live data sources.
  • Admin role in the Lightdash project.
  • A Google account that can read the property, with at least the Viewer role in Google Analytics.

Connect Google Analytics 4

  1. On the nav bar, click Browse → Semantic Layer.
  2. In the sidebar, select Live data sources, then click Add.
  3. Select Google Analytics 4.
  4. Enter a Name, such as Google Analytics.
  5. Click Continue to Google.
  6. Sign in with your Google account and allow read-only access to Google Analytics.
  7. Back in Lightdash, pick the property the source reads.
Lightdash reads the property’s key events and custom metrics, and adds a Report table to Explore. Queries run with the Google account that signed in. To change it, choose Sign in again from the source’s menu.

Dimensions

Metrics

Custom metrics defined in the property are added too. Click Refresh fields after you add a key event or custom metric in Google Analytics. See Dimensions and metrics.

Combination rules

Google Analytics only answers some combinations of dimensions and metrics:
  • A query can use at most 9 dimensions and 10 metrics.
  • Item name only works with item metrics: Item revenue, Items purchased and Items viewed.
  • Date month and Year and month read the same Google Analytics dimension, so a query can only use one of them.
  • Page path is event-scoped. Splitting sessions or users by page counts a session once for each page it visited.
Lightdash checks these rules before calling Google and tells you which dimension or metric to remove.

Supported features

Limits

Google Analytics also applies its own quotas per property.

Example questions

  • “Which channels brought the most sessions in the last 28 days?”
  • “Weekly active users by device category since the start of the quarter.”
  • “Top landing pages by engaged sessions last month.”