Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(data-warehouse): enable more Google Analytics tables by default (#64563)

Tom Owersc1567f3a654d
diff --git a/posthog/temporal/data_imports/sources/google_analytics/settings.py b/posthog/temporal/data_imports/sources/google_analytics/settings.py
index f1f9686ff6fa..a5bf3fd7d158 100644
--- a/posthog/temporal/data_imports/sources/google_analytics/settings.py
+++ b/posthog/temporal/data_imports/sources/google_analytics/settings.py
@@ -42,21 +42,21 @@ GOOGLE_ANALYTICS_REPORT_SCHEMAS: dict[str, GoogleAnalyticsReportSchema] = {
"dimensions": ["date"],
"metrics": ["active1DayUsers"],
"primary_key": ["date"],
- "should_sync_default": False,
+ "should_sync_default": True,
"description": "1-day active users per day (DAU).",
},
"weekly_active_users": {
"dimensions": ["date"],
"metrics": ["active7DayUsers"],
"primary_key": ["date"],
- "should_sync_default": False,
+ "should_sync_default": True,
"description": "Rolling 7-day active users per day (WAU).",
},
"four_weekly_active_users": {
"dimensions": ["date"],
"metrics": ["active28DayUsers"],
"primary_key": ["date"],
- "should_sync_default": False,
+ "should_sync_default": True,
"description": "Rolling 28-day active users per day.",
},
"devices": {
@@ -118,7 +118,7 @@ GOOGLE_ANALYTICS_REPORT_SCHEMAS: dict[str, GoogleAnalyticsReportSchema] = {
"dimensions": ["date", "firstUserSource", "firstUserMedium"],
"metrics": ["totalUsers", "newUsers", "sessions", "engagedSessions"],
"primary_key": ["date", "firstUserSource", "firstUserMedium"],
- "should_sync_default": False,
+ "should_sync_default": True,
"description": "Daily acquisition broken out by the source and medium that first acquired each user.",
},
"events": {
diff --git a/posthog/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py b/posthog/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py
index e8953619849d..dceb088d35a3 100644
--- a/posthog/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py
+++ b/posthog/temporal/data_imports/sources/google_analytics/tests/test_google_analytics_source.py
@@ -60,7 +60,19 @@ def test_get_schemas_returns_all_schemas_with_date_incremental():
def test_get_schemas_default_sync_set():
schemas = GoogleAnalyticsSource().get_schemas(_config(), team_id=1)
by_default_on = {s.name for s in schemas if s.should_sync_default}
- assert by_default_on == {"website_overview", "devices", "locations", "pages", "traffic_sources"}
+ # Everything except `events` syncs by default; `events` is keyed on date+eventName,
+ # so its volume scales with distinct event names and stays opt-in.
+ assert by_default_on == {
+ "website_overview",
+ "daily_active_users",
+ "weekly_active_users",
+ "four_weekly_active_users",
+ "devices",
+ "locations",
+ "pages",
+ "traffic_sources",
+ "user_acquisition",
+ }
def test_get_schemas_filters_by_names():