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

Creating new Smart campaigns is deprecated. Use Create and launch a Performance Max campaign instead. Existing Smart campaigns aren't affected and can still be retrieved, updated, paused, and resumed.

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.

Improve campaign performance

A site owner wants their campaign to generate more leads and conversions. They want to know which changes to the campaign, its landing page, or the site matter most, whether the campaign has been running for months or just launched and hasn't received any traffic yet.

To improve campaign performance:

  1. Call Get or Create Campaign Success Guide from the Paid Ads Platform Suggestions API, specifying the campaign's id as campaignId and setting platformType to GOOGLE. The response contains a campaign success guide: a prioritized list of suggestions for improving the campaign, its landing page, and the site so the campaign generates more leads and conversions. The guide is based on a scan of the campaign's configuration, its landing page, and site settings rather than on performance data, so it's available as soon as the campaign launches, before it receives any traffic. The first request can take up to 120 seconds while the guide is generated.
  2. When the site owner completes a suggestion, call Update Campaign Success Guide Suggestion Status, specifying campaignId, the suggestion's type, and COMPLETED as its status.

Note: Campaign success guides are currently available only for Performance Max Leads campaigns.

For more details, see Paid Ads Platform Suggestions API: Sample Flows.

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: 28 September 2026

Did this help?