> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/introduction.md

## Article Content:

# About the Campaign API

The Campaign API creates, updates, launches, pauses, and deletes Google Ads campaigns for a Wix site. It supports Smart campaigns (auto-managed by Google) and Performance Max (PMAX) campaigns, which run across all Google channels. Performance Max campaigns come in 2 types: retail `PERFORMANCE_MAX` campaigns advertise the products in the account's linked Google Merchant Center feed, and `PERFORMANCE_MAX_LEADS` campaigns build their ads from an asset group and focus on lead generation.

Creating new Smart campaigns is deprecated. Support for it will be removed in a future release, so use Performance Max campaigns instead. Existing Smart campaigns aren't affected and can still be retrieved, updated, paused, and resumed.

With the Campaign API, you can:

- Create Performance Max campaigns.
- Launch a campaign for the first time or resume one after a pause.
- Pause a running campaign, optionally scheduling it to auto-resume at a future date.
- Update campaign settings such as budget, geo targets, and creative assets.
- Retrieve a campaign's full event history.
- Delete draft campaigns.

## Campaign lifecycle

[Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md) creates a campaign immediately in the status you specify. Create it as `DRAFT` to launch it later, or as `LIVE` to start it right away.

- Call [Launch Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/launch-campaign.md) to activate a `DRAFT` campaign for the first time. Call [Resume Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/resume-campaign.md) to reactivate a campaign that was previously live and then explicitly paused.
- Call [Pause Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/pause-campaign.md) to stop a running campaign without losing its configuration. Specify a `scheduledResumeDate` to schedule an automatic resume. A job runs at that time and fires a `CampaignAutoResumed` domain event. Specify `null` to cancel an existing scheduled resume.
- [Update Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/update-campaign.md) isn't a partial update. Retrieve the campaign with [Get Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/get-campaign.md) or [List Campaigns](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/list-campaigns.md), change only the fields you want to update, and specify the entire campaign. The fields to update are inferred from the specified campaign, and fields you omit may be cleared or cause the request to fail.
- Call [Get Campaign Change Log](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/get-campaign-change-log.md) to retrieve the full event history for a campaign. [Get Campaign Status History](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/get-campaign-status-history.md) is a legacy method.

## Campaign statuses

A campaign's `status` is read-only and synced from Google Ads. It may change without developer action, for example due to a policy violation or billing issue. The possible values are:

- `DRAFT`: The campaign was created but not yet launched.
- `LIVE`: The campaign is active and serving ads.
- `PAUSED`: The campaign was paused by the user.
- `LEARNING`: The campaign is in the learning phase (`PERFORMANCE_MAX_LEADS` only, approximately 28 days after launch).
- `IN_REVIEW`: Google is reviewing the campaign's ads, or the campaign's payment setup isn't complete yet.
- `DISAPPROVED`: The campaign or its assets violate Google Ads policy and won't serve.
- `NOT_SERVING`: The campaign isn't serving due to budget limitations.
- `ENDED`: The campaign has ended (PMAX campaigns with an `endDate`).
- `ERROR`: The campaign is in an error state.

## Before you begin

It's important to note the following points before starting to code:

- The Wix Google Ads app must be installed and a Google Ads account must exist for the site before creating campaigns.
- A maximum of 5 campaigns can be live simultaneously per site on standard accounts. This limit applies across all campaign types.
- A campaign serves ads only while the site has an active Google Ads subscription. For custom charges (PAYG) accounts, [Launch Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/launch-campaign.md) and [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md) with `status` set to `LIVE` fail if the subscription has expired.
- Each campaign requires at least one geo target, a language, and a daily budget in micros (1,000,000 micros equals 1 unit of the account's currency). Google caps monthly spend at approximately 30.4 times the daily budget. Use the Suggestions API to get AI-generated budget recommendations and geo target suggestions.
- `PERFORMANCE_MAX_LEADS` campaigns require a `url` and at least one asset group with headlines, long headlines, descriptions, a business name, images, and a logo. Asset validation is synchronous, so invalid assets cause the create call to fail immediately.
- Retail `PERFORMANCE_MAX` campaigns require the account's `merchantCenterAccountLinkStatus.status` to be `ENABLED`. They don't accept asset group assets, asset group signals, excluded keywords, a phone number, or a `url`.

## Use cases

- [Create and launch a Performance Max campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/sample-flows.md#create-and-launch-a-performance-max-campaign).
- [Pause and resume a campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/sample-flows.md#pause-and-resume-a-campaign).

## Terminology

- **Campaign**: An advertising campaign on Google targeting specific audiences, locations, and budgets.
- **Smart Campaign**: A simplified campaign type where Google automatically manages bidding and ad delivery based on keyword themes and geo targets.
- **Performance Max (PMAX)**: A goal-based campaign that runs across all Google channels (Search, Display, YouTube, etc.). There are 2 types: `PERFORMANCE_MAX` and `PERFORMANCE_MAX_LEADS`.
- **`PERFORMANCE_MAX`**: A retail (shopping) Performance Max campaign that advertises the products in the account's linked Google Merchant Center feed, including on Shopping.
- **`PERFORMANCE_MAX_LEADS`**: A Performance Max campaign optimized for lead generation that builds its ads from an asset group you provide, with search theme signals and a 28-day learning phase.
- **Asset Group**: A collection of creative assets (headlines, descriptions, a business name, images, and logos) that a `PERFORMANCE_MAX_LEADS` campaign uses to generate ads.
- **Keyword Theme**: A topic or phrase that guides which search queries a Smart campaign matches.
- **Reporting Key**: An auto-generated identifier derived from the campaign name, embedded as the `utm_campaign` parameter in the campaign's final URL suffix for analytics attribution.

