: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(data-warehouse): add google ads search term keyword stats table (#124153)
Javier Bahamondes86e736950108
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 fb4d139fe0d6..beaac6f31fd1 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,23 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"segments_date": "The date the metrics are reported for.",},},+ "search_term_keyword_stats": {+ "description": "Daily performance for search terms, split by the keyword that matched each one.",+ "docs_url": "https://developers.google.com/google-ads/api/fields/v25/search_term_view",+ "columns": {+ **_IDS,+ "search_term_view_search_term": "The search query a user entered that triggered an ad.",+ "search_term_view_status": "Whether the search term has been added or excluded as a keyword.",+ "segments_keyword_ad_group_criterion": "Resource name of the keyword (ad group criterion) that matched the search term.",+ "segments_keyword_info_text": "Text of the keyword that matched the search term.",+ "segments_keyword_info_match_type": "Match type of that keyword (exact, phrase or broad).",+ "metrics_clicks": "Number of clicks.",+ "metrics_impressions": "Number of impressions.",+ "metrics_cost_micros": "Total cost in micros.",+ "metrics_conversions": "Number of conversions.",+ "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",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 3c92e9c38590..d4fe8b01dd88 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,35 @@ RESOURCE_SCHEMAS: dict[str, dict[str, Any]] = {"segments.date",],},+ "search_term_keyword_stats": {+ "resource_name": "search_term_view",+ "primary_key": [+ "search_term_view.search_term",+ "segments.keyword.ad_group_criterion",+ "campaign.id",+ "ad_group.id",+ "customer.id",+ "segments.date",+ ],+ "filter_field_names": [("segments.date", IncrementalFieldType.Date)],+ "should_sync_default": False,+ "description": "Search terms split by the keyword that matched them. search_term_stats has the same terms without the keyword.",+ "field_names": [+ "search_term_view.search_term",+ "search_term_view.status",+ "segments.keyword.ad_group_criterion",+ "segments.keyword.info.text",+ "segments.keyword.info.match_type",+ "campaign.id",+ "ad_group.id",+ "customer.id",+ "metrics.clicks",+ "metrics.impressions",+ "metrics.cost_micros",+ "metrics.conversions",+ "segments.date",+ ],+ },"performance_max_search_term_stats": {"resource_name": "campaign_search_term_view","primary_key": [