Marketing & analytics — ga / gsc / gbp / marketing
The marketing-analytics tool namespaces — GA4 (ga_*), Search Console (gsc_* and search_console_*), Google Business Profile (gbp_*), and the marketing_* aggregators that combine them.
Five related read-only namespaces cover marketing analytics. They share a
date model — most take start_date / end_date, and the GA4 / convenience
tools accept relative strings like 7daysAgo, 30daysAgo, today. When you
just want the headline numbers, start with the marketing_* aggregators; drop
to a specific namespace when you need detail.
marketing_* — combined snapshots (start here)
Aggregators that pull across GA4, Search Console, and GBP in one call. All
require start_date and end_date.
marketing_snapshot(start_date, end_date, site_url="", account_name="", limit=10)
marketing_seo_snapshot(start_date, end_date, site_url="", limit=10)
marketing_local_snapshot(start_date, end_date, account_name="")
marketing_lead_snapshot(start_date, end_date, limit=10)
| Tool | Combines |
|---|---|
marketing_snapshot | GA4 + Search Console + GBP — the full picture |
marketing_seo_snapshot | Search Console SEO view |
marketing_local_snapshot | GBP local view |
marketing_lead_snapshot | GA4 lead-focused view |
ga_* — Google Analytics 4
Property-scoped (property accepts a configured alias; omit for the default).
Dates default to a trailing window.
ga_list_properties()
ga_run_report(dimensions, metrics, property=None, start_date="7daysAgo",
end_date="today", limit=25)
ga_top_pages(property=None, start_date="7daysAgo", end_date="today", limit=10)
ga_traffic_sources(property=None, start_date="7daysAgo", end_date="today", limit=10)
ga_realtime_overview(property=None)
ga_marketing_overview(property=None, business_page_prefixes=None,
conversion_event_names=None,
start_date="30daysAgo", end_date="today", limit=25)
ga_run_report is the generic escape hatch — pass any GA4 dimensions and
metrics arrays. The named tools (ga_top_pages, ga_traffic_sources, …) are
pre-baked common reports. ga_marketing_overview is the lead-page-oriented
summary; scope it with business_page_prefixes and conversion_event_names.
Other named reports in the namespace: ga_devices, ga_geo_overview,
ga_search_terms, ga_conversion_overview, ga_landing_pages.
gsc_* — Search Console (convenience)
gsc_run_query(dimensions, site_url="", search_type="web", start_date="30daysAgo",
end_date="today", row_limit=25, country="", device="",
page="", query="", dimension_filter_groups=None)
gsc_top_queries(site_url="", start_date="30daysAgo", end_date="today",
row_limit=25, country="", device="", page="", query_regex="")
gsc_local_visibility(site_url="", keywords=None, page_filters=None,
start_date="30daysAgo", end_date="today", row_limit=25, ...)
gsc_run_query is the generic one (dimensions required); the rest are common
reports. gsc_local_visibility filters to local-intent keywords. Dates default
here, unlike search_console_*.
search_console_* — Search Console (inventory & page detail)
search_console_list_sites()
search_console_list_sitemaps(...)
search_console_top_queries(start_date, end_date, site_url="", limit=25, ...)
search_console_top_pages(start_date, end_date, ...)
search_console_page_queries(page, start_date, end_date, ...)
start_date / end_date are required (no defaults). search_console_page_queries
breaks down the queries driving one specific page — the tool for “why is this
URL ranking.”
gbp_* — Google Business Profile
Location performance for local presence. The performance tools default
daily_metrics to the standard set (maps/search impressions, direction
requests, call clicks, website clicks).
gbp_list_accounts()
gbp_list_locations(account_name="", filter_expression="", order_by="title", limit=100)
gbp_get_location(...)
gbp_location_performance(location_name, start_date="30daysAgo", end_date="today",
daily_metrics=[...])
gbp_multi_location_summary(account_name="", location_names=None,
start_date="30daysAgo", end_date="today",
daily_metrics=[...], page_size=100)
gbp_local_overview(...)
gbp_location_performance is one location; gbp_multi_location_summary
aggregates across many — the tool for a multi-site local rollup.