Google Ads APIs: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Install the app and create a Google Ads account

A site owner wants to set up Google Ads for their Wix site for the first time.

To install the app and create a Google Ads account:

  1. Call Install App to install the Wix Google Ads integration on the site. This is required before calling any other service.
  2. Call Create Account to create a new Google Ads account linked to the site. Pass the site owner's preferred currency in the currency field.

Create and launch a Smart campaign

A site owner wants to create a simple, automatically managed Google Ads campaign.

To create and launch a Smart campaign:

  1. Call Get Keyword Theme Suggestions and Get Geo Options with the site's URL to get keyword themes and geographic targets suggested by Google.
  2. Call Get Budget Suggestions to get low, recommended, and high daily budget options with estimated click ranges.
  3. Call Create Campaign with campaignType set to SMART, the suggested keyword themes and locations, and the chosen budget.dailyBudgetMicros. The campaign is created in the status you specify.
  4. Call Launch Campaign with the campaign's id to activate it and begin serving ads.

Create and launch a Performance Max campaign

A site owner wants to run a Performance Max (PMAX) campaign across all Google channels using their creative assets.

To create and launch a Performance Max campaign:

  1. Call Get Text Asset Suggestions with the site's landing page URL to get AI-generated headlines, descriptions, and other text assets.
  2. Call Get Image Asset Suggestions to get AI-generated image assets. Images are automatically uploaded to the site's Wix Media Manager.
  3. Call Generate Budget Recommendation with campaignType set to PERFORMANCE_MAX to get a budget recommendation from Google.
  4. Call Create Campaign with campaignType set to PERFORMANCE_MAX, the generated asset groups, and the recommended daily budget.
  5. Call Launch Campaign with the campaign's id to activate it.

Pause and resume a campaign

A site owner wants to temporarily stop a running campaign and resume it later without losing its configuration.

To pause a campaign:

  1. Call Pause Campaign with the campaign's id. The campaign stops serving ads immediately, but all settings and data are preserved.

To resume the paused campaign:

  1. Call Resume Campaign with the campaign's id to reactivate it.

Retrieve campaign performance analytics

A site owner wants to see how their running campaign is performing.

To retrieve campaign analytics:

  1. Call Query Performance Metrics with the campaign's campaignResourceName and a dateRange to retrieve impressions, clicks, CTR, and cost. Performance data is typically available within a few hours of campaign activity.
  2. Optionally, call Query Search Term Metrics with the campaign's resource name to see which search queries triggered the campaign's ads.
  3. Optionally, call Query Conversion Metrics with the campaign's id to retrieve conversion and revenue data from Wix Analytics.

Retrieve payment details

A site owner wants to review their ad spend and upcoming charges for a Google Ads account.

To retrieve payment details:

  1. Call Get Payment Details to get the current billing period breakdown, including ad spend, Wix service fee, total charge, and any coupon adjustments. A positive creditBalance means the account has credits available; a negative value indicates outstanding debt that hasn't yet been charged.

Last updated: 14 July 2026

Did this help?