RECIPE: Query Campaign Performance Analytics

Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
Copy

Read how a Google Ads campaign is performing. Six query endpoints cover different breakdowns; picking the right one depends on the metric and the campaign type. Performance data is only available once a campaign is LIVE, and typically appears within a few hours of activity.

Base URL: https://www.wixapis.com/google-ads/v1 (search-term V2 is under /v2). <AUTH> is the Authorization header; body calls also need Content-Type: application/json. All endpoints are read-only.

Two identifiers — get them right:

  • campaignResourceName — the Google Ads resource name customers/{customerId}/campaigns/{campaignId} (from campaign.resourceName). Used by Performance Metrics and Search Term Metrics (v1).
  • campaignId — the Wix-internal campaign GUID (from campaign.id). Used by Conversion Metrics, Shopping Performance, Asset Performance, and Search Term Metrics V2.

Both come from Get/List Campaign (see Manage Campaign Lifecycle).

Which query?

QuestionEndpointCampaign typesID
Daily impressions/clicks/CTR/cost/leadsPOST /v1/performance-metricsallcampaignResourceName
Orders / revenue / ROAS (from Wix)POST /v1/conversion-metricsallcampaignId
Which search queries triggered adsPOST /v2/search-term-metricsSmart + PMAX LeadscampaignId
Per-product performancePOST /v1/shopping-performance-metricsShopping / retail PMAXcampaignId
Per-asset (headline/description/image)POST /v1/asset-performance-metricsPMAX Leads onlycampaignId

Date range is shared: { "dateRange": { "custom": { "from": "2026-03-01", "to": "2026-03-31" } } } (YYYY-MM-DD). Omit dateRange to default to the campaign lifetime.


Daily performance metrics

Clicks, impressions, CTR, cost, leads, phone calls — per day, plus a summary row. fields chooses which metrics to return (defaults to clicks, impressions, CTR, cost, phone calls, date). includePreviousPeriod: true adds a previousPeriodSummaryRow and trends (decimal % change vs the equivalent preceding period).

Copy
Copy

fields enum: DATE, IMPRESSIONS, CLICKS, CTR, COST, LEADS, PHONE_CALLS, COST_PER_CLICK, CLICKS_BY_AD_NETWORK_TYPE, IMPRESSIONS_BY_AD_NETWORK_TYPE. ctr and trends are decimals (0.0703 = 7.03%; 0.155 = +15.5%). cost is already in currency units (converted from micros).

Conversion metrics (orders, revenue, ROAS)

Business outcomes from Wix Analytics (not Google). Both campaignId and dateRange are required. Complex query — 120s SLA.

Copy
Copy

Search terms that triggered ads

The actual queries users typed. Use V2 (/v2/search-term-metrics, keyed by campaignId) — it supports both Smart and PMAX Leads. Optional searchTermText (contains-match) and searchTermTextsFilter ({ type: "MATCH" | "NOT_MATCH", searchTermTexts: [...] }). Sortable by COST/CLICKS/IMPRESSIONS; paged with nextPageToken.

Copy
Copy

(The v1 /v1/search-term-metrics variant exists but takes campaignResourceName and is Smart-only — prefer V2.)

Per-product shopping performance (retail / Shopping PMAX)

Product-level rows for a Shopping campaign, plus a summary with total conversions, revenue, and ROAS. resultSetting controls the payload: SUMMARY_ONLY, RESULTS_ONLY, or SUMMARY_AND_RESULTS. 120s SLA. Note: per-product conversions/conversionRate always return 0 (not queried from Google) — use the summary's totalConversions/roas for outcomes.

Copy

Results carry productTitle, productImageUrl, and the Wix productId; the summaryRow has totalConversions, totalRevenue, roas, and moreResultsAvailable.

Per-asset performance (PMAX Leads only)

Which creative assets perform best. filter.assetTypes narrows to specific roles (HEADLINE, DESCRIPTION, MARKETING_IMAGE, …).

Copy

Each result has assetContent, assetFieldType, assetSource (ADVERTISER vs auto-generated), a performanceLabel (EXCELLENT/GOOD/…), and a nested metrics object.


Error handling

SymptomCauseFix
Empty results / all-zero metricsCampaign not LIVE, or no activity yet in the rangeConfirm the campaign is live; data lags a few hours. Widen the date range
ACCOUNT_NOT_FOUND / CAMPAIGN_NOT_FOUNDWrong id or no accountVerify via List/Get Campaign
Wrong-id error on performance/search-term-v1Passed campaignId where campaignResourceName is required (or vice-versa)Match the ID column in the "Which query?" table
Asset-performance returns nothing on a non-Leads campaignOnly PMAX Leads is supportedUse performance/shopping metrics for other types
Shopping per-product conversions/conversionRate are 0By design (not queried from Google)Read the summary's totalConversions/roas
Slow response (conversion/shopping)120s SLAWait; don't retry prematurely

References

Last updated: 3 August 2026

Did this help?