: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(warehouse): sync performance max search terms from google ads (#122868)
Javier Bahamondesde9b7c15ed10
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/canonical_descriptions.pyindex 601c0cb70e4e..74db685457fe 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/canonical_descriptions.py@@ -365,6 +365,21 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"segments_date": "The date the metrics are reported for.",},},+ "performance_max_search_term_stats": {+ "description": "Daily performance for the search terms that triggered Performance Max campaigns (campaign_search_term_view).",+ "docs_url": "https://developers.google.com/google-ads/api/fields/v25/campaign_search_term_view",+ "columns": {+ "customer_id": _IDS["customer_id"],+ "campaign_id": _IDS["campaign_id"],+ "campaign_search_term_view_search_term": "The search query a user entered that triggered a Performance Max ad.",+ "metrics_clicks": _METRICS["metrics_clicks"],+ "metrics_impressions": _METRICS["metrics_impressions"],+ "metrics_cost_micros": _METRICS["metrics_cost_micros"],+ "metrics_conversions": _METRICS["metrics_conversions"],+ "metrics_conversions_value": _METRICS["metrics_conversions_value"],+ "segments_date": _SEGMENTS["segments_date"],+ },+ },"geographic_stats": {"description": "Daily performance broken out by user geographic location (geographic_view).","docs_url": "https://developers.google.com/google-ads/api/fields/v17/geographic_view",diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/schemas.py b/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/schemas.pyindex 7e8f78783d22..8f0f09b4a230 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/schemas.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/google_ads/schemas.py@@ -896,6 +896,30 @@ RESOURCE_SCHEMAS: dict[str, dict[str, Any]] = {"segments.date",],},+ "performance_max_search_term_stats": {+ "resource_name": "campaign_search_term_view",+ "primary_key": [+ "campaign_search_term_view.search_term",+ "campaign.id",+ "customer.id",+ "segments.date",+ ],+ "filter_field_names": [("segments.date", IncrementalFieldType.Date)],+ "description": "Search terms that triggered Performance Max campaigns. Search campaign terms are in search_term_stats.",+ # campaign_search_term_view also returns Search and Shopping campaigns, which search_term_stats already covers.+ "extra_where": "campaign.advertising_channel_type = 'PERFORMANCE_MAX'",+ "field_names": [+ "campaign_search_term_view.search_term",+ "campaign.id",+ "customer.id",+ "metrics.clicks",+ "metrics.impressions",+ "metrics.cost_micros",+ "metrics.conversions",+ "metrics.conversions_value",+ "segments.date",+ ],+ },"geographic_stats": {"resource_name": "geographic_view","primary_key": [