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
- On the nav bar, click Browse → Semantic Layer.
- In the sidebar, select Live data sources, then click Add.
- Select Google Analytics 4.
- Enter a Name, such as
Google Analytics. - Click Continue to Google.
- Sign in with your Google account and allow read-only access to Google Analytics.
- Back in Lightdash, pick the property the source reads.
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.
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.”