The Analytics API queries performance data for a site's running Google Ads campaigns. It returns metrics such as impressions, clicks, conversions, and cost, as well as deeper data including search terms, shopping performance, and asset-level breakdowns for Performance Max Leads campaigns.
With the Analytics API, you can:
It's important to note the following points before starting to code:
LAUNCHED status. Paused or draft campaigns do not produce analytics data.QuerySearchTermMetrics (v1) only works for Smart campaigns. Use QuerySearchTermMetricsV2 for Performance Max Leads campaigns.QueryConversionMetrics queries Wix Analytics data, not Google Ads directly.QueryAssetPerformanceMetrics only supports Performance Max Leads campaigns. Calling it for any other campaign type returns an error.QueryAssetPerformanceMetrics results include every asset configured on the campaign, not just assets Google Ads has reported traffic for. Assets without traffic are returned with zero-value metrics so you can see the full creative set.QueryAssetPerformanceMetrics results unless the campaign has URL expansion enabled.performanceLabel reflects its Google Ads review status first (for example PENDING or DISAPPROVED); once an asset clears review, the label is based on CTR thresholds that vary by asset type, and assets remain labeled LEARNING for an initial period after creation.QueryShoppingPerformanceMetrics accepts a dateRange that scopes both the per-product results and the summary row's revenue, conversions, and ROAS.Last updated: 16 July 2026