@wix/agent-skills 1.19.0 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +33 -31
  3. package/skills/wix-app/references/DASHBOARD_PAGE.md +6 -10
  4. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +17 -8
  5. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +53 -131
  6. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +1 -2
  7. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +88 -73
  8. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +46 -22
  9. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +20 -6
  10. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +9 -0
  11. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +71 -31
  12. package/skills/wix-app/references/editor-react-component/PARTS.md +5 -2
  13. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -5
  14. package/skills/wix-app/scripts/pkg-root.cjs +73 -0
  15. package/skills/wix-app/scripts/scan-a11y-code.cjs +310 -40
  16. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +118 -24
  17. package/skills/wix-app/scripts/scan-a11y-render.cjs +551 -0
  18. package/skills/wix-app/scripts/scan-a11y-review.cjs +373 -0
  19. package/skills/wix-base44-connector/SKILL.md +67 -43
  20. package/skills/wix-base44-connector/scripts/utils.cjs +39 -3
  21. package/skills/wix-docs/SKILL.md +47 -20
  22. package/skills/wix-headless/SKILL.md +1 -0
  23. package/skills/wix-headless/entry/bootstrap.mjs +106 -50
  24. package/skills/wix-headless/entry/skill.md +5 -3
  25. package/skills/wix-headless/references/CAPABILITIES.md +7 -2
  26. package/skills/wix-headless/references/SDK_HANDOFF.md +2 -1
  27. package/skills/wix-headless/references/inline-recipes/experience-store.md +48 -0
  28. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +350 -114
  29. package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +1 -1
  30. package/skills/wix-headless/references/managed/AUTHENTICATION.md +25 -5
  31. package/skills/wix-headless/references/managed/CREATE.md +5 -0
  32. package/skills/wix-headless-fast/SKILL.md +25 -7
  33. package/skills/wix-headless-fast/entry/skill.md +23 -14
  34. package/skills/wix-headless-fast/install/fast-path.mjs +48 -5
  35. package/skills/wix-headless-fast/install/pin-agents-md.mjs +57 -0
  36. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +3 -3
  37. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +204 -35
  38. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +146 -36
  39. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +8 -2
  40. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +95 -20
  41. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +21 -2
  42. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +104 -18
  43. package/skills/wix-manage/SKILL.md +16 -10
  44. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +4 -1
  45. package/skills/wix-manage/references/bookings/create-appointment-service.md +3 -1
  46. package/skills/wix-manage/references/bookings/create-class-service.md +3 -1
  47. package/skills/wix-manage/references/bookings/create-course-service.md +4 -2
  48. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +68 -3
  49. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-seasonal-promotion.md +1 -1
  50. package/skills/wix-manage/references/google-ads/billing-and-payment.md +3 -3
  51. package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +8 -8
  52. package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +4 -4
  53. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +1 -1
  54. package/skills/wix-manage/references/google-ads/install-and-create-account.md +9 -9
  55. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +108 -14
  56. package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +7 -7
  57. package/skills/wix-manage/references/seo/manage-content-plan.md +182 -136
  58. package/skills/wix-manage/references/seo/manage-google-search-console.md +272 -0
  59. package/skills/wix-manage/references/sites/upload-static-site.md +283 -0
  60. package/skills/wix-manage/references/stores/change-store-currency.md +1 -1
  61. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +3 -1
  62. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +3 -1
  63. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
  64. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +69 -27
  65. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +32 -14
  66. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +14 -3
  67. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +41 -35
  68. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +77 -30
  69. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +31 -2
  70. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +31 -6
  71. package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +0 -80
  72. package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +0 -140
  73. package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +0 -112
  74. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +0 -100
  75. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +0 -130
  76. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +0 -48
  77. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +0 -66
  78. package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +0 -103
  79. package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +0 -56
  80. package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +0 -23
@@ -1,11 +1,68 @@
1
1
  ---
2
2
  name: "End-to-End Booking Flow"
3
- description: Complete booking flow from service discovery to payment. Query services, check availability with Time Slots V2, create bookings, and process payment via eCommerce checkout.
3
+ description: Books and settles appointments, classes and courses with the site owner's credentials — an operator managing bookings, or server-side code booking as the owner. Covers service discovery, availability with Time Slots V2, creating the booking, and settling it by direct confirmation or eCommerce checkout. A visitor booking for themselves needs a visitor token instead; this recipe links that path.
4
4
  ---
5
5
 
6
6
  # End-to-End Booking Flow (REST)
7
7
 
8
- Step-by-step flow for implementing a complete booking experience using REST APIs.
8
+ Step-by-step flow for creating and settling bookings **with the site owner's credentials** —
9
+ see who that covers, and where visitor-facing code goes instead, immediately below.
10
+
11
+ > ## ⚠️ These are owner-side calls, not visitor-facing code
12
+ >
13
+ > Every call below runs with the **site owner's credentials** — an API key or the site's admin
14
+ > token. That covers two situations, and both are this recipe:
15
+ >
16
+ > - an **operator managing bookings**, calling these APIs from a script, a management tool, or a
17
+ > back-office screen
18
+ > - **server-side code in a site or app acting as the owner** — a backend function booking a
19
+ > client in, a scheduled job, a webhook handler
20
+ >
21
+ > Either way the booking belongs to the site, not to the person being booked.
22
+ >
23
+ > **Building a site or app where a visitor books for themselves? These payloads are right, the
24
+ > identity is not.** A visitor's booking and checkout run on an **anonymous visitor token** minted
25
+ > from the site's OAuth app client id. Using the owner's credentials for a visitor's purchase
26
+ > produces a checkout that belongs to the site: no cart persistence, no abandoned-checkout
27
+ > recovery, and no attribution to the customer. Read these first:
28
+ >
29
+ > - [Book an Appointment](https://dev.wix.com/docs/api-reference/business-solutions/bookings/skills/book-an-appointment)
30
+ > — the same flow from the visitor's side: visitor token, slot re-validation, booking form
31
+ > fields, checkout hand-off, and eight pitfalls from real conversations
32
+ > - [Retrieve Tokens](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/retrieve-tokens)
33
+ > — minting and refreshing the anonymous visitor token
34
+ > - [Allow Redirect URIs and Domains](https://dev.wix.com/docs/go-headless/authentication/setup/allow-redirect-uris-and-domains)
35
+ > — registering your URLs so the visitor returns to your app after the Wix-hosted checkout
36
+ > - [Manage OAuth Apps](../sites/manage-oauth-apps.md) — creating the OAuth app, whose id is the
37
+ > `client_id` the frontend mints visitor tokens from
38
+ > - [Bookings Quick Start](https://dev.wix.com/docs/go-headless/self-managed-headless/tutorials/java-script-sdk-tutorials/bookings-quick-start)
39
+ > — the same flow through the JavaScript SDK on a headless site
40
+ >
41
+ > Mixed apps are normal: the owner's credentials manage the catalog, staff, policies and coupons
42
+ > (the recipes here), while the visitor's own token books and pays.
43
+
44
+ ## Contents
45
+
46
+ 1. [Query Available Services](#step-1-query-available-services) — `POST /bookings/v2/services/query`.
47
+ The three service types and how each one changes the rest of the flow, plus the four fields to
48
+ carry forward: `id`, `schedule.id`, `type`, `staffMemberIds`.
49
+ 2. [Check Availability](#step-2-check-availability) — `POST /_api/service-availability/v2/time-slots`.
50
+ Time Slots V2 replaces the deprecated Availability Calendar. Dates must be full local
51
+ datetimes or the call 400s; `availableResources` stays empty unless you ask for it by resource
52
+ type; the `location.locationType` a slot returns is **not** the value Create Booking accepts.
53
+ Classes come from a different endpoint and carry an `eventId`.
54
+ 3. [Create the Booking](#step-3-create-the-booking) — `POST /_api/bookings-service/v2/bookings`.
55
+ One payload shape per service type: appointments need every slot field spelled out, classes
56
+ need only the service and event ids and derive the rest, courses book a whole schedule.
57
+ Participants are `totalParticipants` **or** `participantsChoices`, never both. The booking
58
+ lands as `CREATED` and is not on the calendar until step 4.
59
+ 4. [Confirm or Process Payment](#step-4-confirm-or-process-payment) — two branches. Free and
60
+ pay-at-location bookings are confirmed directly with a payment status. Paid bookings go into a
61
+ cart that references the booking id, and whoever is paying is sent to its checkout URL; a
62
+ server-to-server place-order path skips the payment page entirely, which only fits an operator
63
+ or backend job booking someone in.
64
+ 5. [Service Type Summary](#service-type-summary) — appointment, class and course side by side:
65
+ which `bookedEntity` each uses, which availability API feeds it, and what makes it different.
9
66
 
10
67
  ## Prerequisites
11
68
 
@@ -256,7 +313,15 @@ Use the booking ID as `catalogItemId` with the Wix Bookings app ID. Save `cart.i
256
313
 
257
314
  Redirect the user to the returned `checkoutUrl`. After payment, the booking is automatically confirmed.
258
315
 
259
- **4c. Place Order (alternative, server-to-server)**
316
+ > When the person paying is a visitor, create the cart and this URL **with their visitor token**,
317
+ > not the owner's credentials — see the note at the top. The call succeeds either way, which is
318
+ > what makes it easy to get wrong.
319
+
320
+ **4c. Place Order — no payment page (alternative, server-to-server)**
321
+
322
+ > This one only makes sense on the owner's side: it creates the order outright, with nobody
323
+ > visiting a payment page. Right for an operator or backend job booking someone in; not a way to
324
+ > charge a visitor, who still has to be sent to checkout.
260
325
 
261
326
  First calculate the cart to get a price-verification token:
262
327
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Flow: Seasonal Promotion"
3
- description: SEASONAL sub-flow — load [Goal: Seasonal Revenue] FIRST (it owns classification and routing); this is a sub-step, NOT a direct entry from README.
3
+ description: "SEASONAL sub-flow — load [Goal: Seasonal Revenue] FIRST (it owns classification and routing); this is a sub-step, NOT a direct entry from README."
4
4
  ---
5
5
  # Flow: Seasonal Promotion
6
6
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: "Retrieve Google Ads Billing and Payment Details"
3
- description: "Retrieves billing and payment details for a Wix site's Google Ads account: the current billing period's ad spend (usage), the Wix service fee, the total charge, any promotional coupon adjustment, the billing period dates, and the account's credit balance (positive = available credits, negative = outstanding debt not yet charged). Also explains reading current vs remaining budget from the account object. Use when the user asks 'how much have I spent on Google Ads', 'what's my next Google Ads charge', 'show my ad billing', 'do I have ad credits left', 'why was I charged', or 'upcoming Google Ads payment'. Requires an existing Google Ads account. REST base https://www.wixapis.com/google-ads/v1."
3
+ description: "Retrieves billing and payment details for a Wix site's Google Ads account: the current billing period's ad spend (usage), the Wix service fee, the total charge, any promotional coupon adjustment, the billing period dates, and the account's credit balance (positive = available credits, negative = outstanding debt not yet charged). Also explains reading current vs remaining budget from the account object. Use when the user asks 'how much have I spent on Google Ads', 'what's my next Google Ads charge', 'show my ad billing', 'do I have ad credits left', 'why was I charged', or 'upcoming Google Ads payment'. Requires an existing Google Ads account. REST base https://www.wixapis.com/_serverless/pa-google/v1."
4
4
  ---
5
5
  # RECIPE: Retrieve Google Ads Billing and Payment Details
6
6
 
7
7
  Report what a site owner will be charged for Google Ads: ad spend, the Wix service fee, coupon adjustments, the total, the billing period, and the account's credit balance.
8
8
 
9
- Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorization` header. This endpoint is read-only.
9
+ Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`. `<AUTH>` is the `Authorization` header. This endpoint is read-only.
10
10
 
11
11
  **Prerequisite:** a Google Ads account must exist (`ACCOUNT_NOT_FOUND` → run [install-and-create-account](install-and-create-account.md)).
12
12
 
@@ -17,7 +17,7 @@ Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorizatio
17
17
  Billing is calculated from cached subscription data (not fetched live from Google), and the charge calculation is heavy — this endpoint has a **30-second SLA**, so allow time and don't retry prematurely.
18
18
 
19
19
  ```bash
20
- curl -X GET 'https://www.wixapis.com/google-ads/v1/payment-details' -H 'Authorization: <AUTH>'
20
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/payment-details' -H 'Authorization: <AUTH>'
21
21
  ```
22
22
 
23
23
  ```json
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Create and Launch a Performance Max Campaign"
3
- description: "Creates and launches a Google Ads Performance Max (PMAX) campaign for a Wix site — a goal-based campaign that runs across all Google channels (Search, Display, YouTube, Gmail, Discover, Maps) from an asset group of headlines, descriptions, images, and (for PMAX Leads) search-theme signals. Covers generating AI text and image assets, generating search themes, getting a Google budget recommendation, assembling the asset group with the required minimum assets, choosing PERFORMANCE_MAX vs PERFORMANCE_MAX_LEADS (leads: phone/form goals, negative keywords, 28-day learning) vs retail/Shopping (Merchant Center feed), creating in PAUSED, and launching. Use for 'create a Performance Max campaign', 'PMAX', 'run ads across all of Google', 'lead-gen Google campaign', or 'Google Shopping ads'. Requires an existing Google Ads account. REST base https://www.wixapis.com/google-ads/v1."
3
+ description: "Creates and launches a Google Ads Performance Max (PMAX) campaign for a Wix site — a goal-based campaign that runs across all Google channels (Search, Display, YouTube, Gmail, Discover, Maps) from an asset group of headlines, descriptions, images, and (for PMAX Leads) search-theme signals. Covers generating AI text and image assets, generating search themes, getting a Google budget recommendation, assembling the asset group with the required minimum assets, choosing PERFORMANCE_MAX vs PERFORMANCE_MAX_LEADS (leads: phone/form goals, negative keywords, 28-day learning) vs retail/Shopping (Merchant Center feed), creating in PAUSED, and launching. Use for 'create a Performance Max campaign', 'PMAX', 'run ads across all of Google', 'lead-gen Google campaign', or 'Google Shopping ads'. Requires an existing Google Ads account. REST base https://www.wixapis.com/_serverless/pa-google/v1."
4
4
  ---
5
5
  # RECIPE: Create and Launch a Performance Max Campaign
6
6
 
@@ -10,7 +10,7 @@ A **Performance Max (PMAX)** campaign runs across every Google channel from a si
10
10
  - **`PERFORMANCE_MAX_LEADS`** — lead-gen variant (phone/form conversions, search-theme signals, negative keywords, a ~28-day learning phase). **Requires** at least one asset group with headlines, descriptions, and images; assets are validated synchronously, so bad assets fail the create call immediately.
11
11
  - **Retail / Shopping** — a `PERFORMANCE_MAX` campaign linked to a Google Merchant Center feed (set `merchantCenterAccountId` on the account first — see [install-and-create-account](install-and-create-account.md) — and use `feedLabel`). Retail campaigns don't require a hand-built asset group.
12
12
 
13
- Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`. The bidding strategy is server-enforced to `MAXIMIZE_CONVERSIONS` — never set it yourself.
13
+ Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`. The bidding strategy is server-enforced to `MAXIMIZE_CONVERSIONS` — never set it yourself.
14
14
 
15
15
  > **Launching spends real money.** Present the assembled asset group and budget and get explicit approval before the Launch call (STEP 5). Create in `PAUSED` first — nothing serves until Launch.
16
16
 
@@ -25,7 +25,7 @@ Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorizatio
25
25
  `suggestionInfo.landingPageUrl` and `textSuggestionInfo.languageCode` are both required. Response may take up to 60s.
26
26
 
27
27
  ```bash
28
- curl -X POST 'https://www.wixapis.com/google-ads/v1/text-asset-suggestions' \
28
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/text-asset-suggestions' \
29
29
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
30
30
  -d '{
31
31
  "suggestionInfo": { "landingPageUrl": "https://www.example.com", "assetTypes": ["HEADLINE", "DESCRIPTION"] },
@@ -46,7 +46,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/text-asset-suggestions' \
46
46
  Images are generated with AI and **automatically uploaded to the site's Wix Media Manager** — the returned `url` is a `static.wixstatic.com` link you can use directly in the asset group. `suggestionInfo.landingPageUrl` is required.
47
47
 
48
48
  ```bash
49
- curl -X POST 'https://www.wixapis.com/google-ads/v1/image-asset-suggestions' \
49
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/image-asset-suggestions' \
50
50
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
51
51
  -d '{ "suggestionInfo": { "landingPageUrl": "https://www.example.com", "assetTypes": ["MARKETING_IMAGE", "SQUARE_MARKETING_IMAGE"] } }'
52
52
  ```
@@ -63,7 +63,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/image-asset-suggestions' \
63
63
  Search themes are the targeting signals for a leads campaign's asset group. `textSuggestionInfo.languageCode` is required.
64
64
 
65
65
  ```bash
66
- curl -X POST 'https://www.wixapis.com/google-ads/v1/search-theme-suggestions' \
66
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/search-theme-suggestions' \
67
67
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
68
68
  -d '{ "landingPageUrl": "https://www.example.com", "textSuggestionInfo": { "languageCode": "en" } }'
69
69
  ```
@@ -79,7 +79,7 @@ Each string becomes a `{ "searchTheme": { "text": "…" } }` signal in the asset
79
79
  PMAX uses **Generate Budget Recommendation** (not the Smart-campaign budget-suggestions endpoint). `campaignType`, `assetGroupInfo` (with a `finalUrl`), and `currency` are required.
80
80
 
81
81
  ```bash
82
- curl -X POST 'https://www.wixapis.com/google-ads/v1/budget-recommendation' \
82
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/budget-recommendation' \
83
83
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
84
84
  -d '{
85
85
  "campaignType": "PERFORMANCE_MAX",
@@ -129,7 +129,7 @@ Image `url` must be a Wix Media Manager URL (`static.wixstatic.com`) — the STE
129
129
  **Create a PMAX Leads campaign** (status required; create `PAUSED`):
130
130
 
131
131
  ```bash
132
- curl -X POST 'https://www.wixapis.com/google-ads/v1/campaigns' \
132
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns' \
133
133
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
134
134
  -d '{
135
135
  "campaign": {
@@ -178,7 +178,7 @@ Save the returned `campaign.id` and `resourceName`. `status` is read-only and sy
178
178
  ## STEP 5: Launch the campaign
179
179
 
180
180
  ```bash
181
- curl -X POST 'https://www.wixapis.com/google-ads/v1/campaigns/{campaignId}/launch' \
181
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns/{campaignId}/launch' \
182
182
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
183
183
  ```
184
184
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: "Get AI Campaign Suggestions for Google Ads"
3
- description: "Reference for the Google Ads Suggestions API on a Wix site: AI/Google-generated inputs that help build effective campaigns — keyword themes (from a URL or autocomplete), geo-target options, low/recommended/high daily-budget tiers with estimated clicks, PMAX budget recommendations, text assets (headlines/descriptions), AI image assets (auto-uploaded to Wix Media), search themes, promotional incentive offers, and complete AI-generated campaign configurations from a campaign brief. Use when the user asks 'suggest keywords for my ads', 'what budget should I use', 'where should I target', 'generate ad copy/headlines', 'generate ad images', 'suggest a whole campaign', or when a create-campaign flow needs suggested values. REST base https://www.wixapis.com/google-ads/v1."
3
+ description: "Reference for the Google Ads Suggestions API on a Wix site: AI/Google-generated inputs that help build effective campaigns — keyword themes (from a URL or autocomplete), geo-target options, low/recommended/high daily-budget tiers with estimated clicks, PMAX budget recommendations, text assets (headlines/descriptions), AI image assets (auto-uploaded to Wix Media), search themes, promotional incentive offers, and complete AI-generated campaign configurations from a campaign brief. Use when the user asks 'suggest keywords for my ads', 'what budget should I use', 'where should I target', 'generate ad copy/headlines', 'generate ad images', 'suggest a whole campaign', or when a create-campaign flow needs suggested values. REST base https://www.wixapis.com/_serverless/pa-google/v1."
4
4
  ---
5
5
  # RECIPE: Get AI Campaign Suggestions for Google Ads
6
6
 
7
7
  The Suggestions API produces the values that make a campaign effective — keywords, locations, budgets, and creative assets — either from Google directly or from Wix's AI. It's the input layer for the create-campaign recipes; this file is the standalone reference for each endpoint and for the two that don't appear there (full campaign suggestions from a brief, and incentive offers).
8
8
 
9
- Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`. All suggestion endpoints are **read-only** — none create or spend anything, so run them freely.
9
+ Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`. All suggestion endpoints are **read-only** — none create or spend anything, so run them freely.
10
10
 
11
11
  > **Two conventions to carry into every answer (this is where they trip people up):**
12
12
  > - **Budgets come back in micros.** Every `dailyBudget` / `budgetAmountMicros` / `recommendedBudgetAmountMicros` is in micros, where `1,000,000` micros = 1 unit of the account's currency (so `15000000` = $15.00/day). Always convert to currency units when presenting to a user, and pass micros back when creating a campaign.
@@ -39,7 +39,7 @@ Generates one or more complete, ready-to-use campaign configurations — assets,
39
39
  - `campaignType` — `SMART` (default) or `PERFORMANCE_MAX_LEADS`.
40
40
 
41
41
  ```bash
42
- curl -X POST 'https://www.wixapis.com/google-ads/v1/campaign-suggestions' \
42
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaign-suggestions' \
43
43
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
44
44
  -d '{ "campaignBriefId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "amount": 1, "campaignType": "SMART" }'
45
45
  ```
@@ -73,7 +73,7 @@ Present `campaignMessaging` and the config to the user, then use the `campaign`
73
73
  Credit offers for **new** accounts, granted after a spend threshold. Only supported currencies return offers. This drives the optional incentive step of [account setup](install-and-create-account.md).
74
74
 
75
75
  ```bash
76
- curl -X GET 'https://www.wixapis.com/google-ads/v1/incentives?currency=USD' -H 'Authorization: <AUTH>'
76
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/incentives?currency=USD' -H 'Authorization: <AUTH>'
77
77
  ```
78
78
 
79
79
  Returns `lowOffer` / `mediumOffer` / `highOffer`, each with `incentiveId`, `awardAmount`, and `requiredAmount`, plus a `consolidatedTermsAndConditionsUrl`. Pass the chosen `incentiveId` as `selectedIncentiveId` when creating the account.
@@ -15,7 +15,7 @@ Build direct links into the Google Ads page of a site's dashboard. For the gener
15
15
 
16
16
  ## Pairing Entities with Their Read APIs
17
17
 
18
- Fetch state via the Google Ads recipes in this area (`GET /google-ads/v1/accounts/current-site`, `GET /google-ads/v1/accounts/current-site/conversion-actions`), then link the page.
18
+ Fetch state via the Google Ads recipes in this area (`GET /_serverless/pa-google/v1/accounts/current-site`, `GET /_serverless/pa-google/v1/accounts/current-site/conversion-actions`), then link the page.
19
19
 
20
20
  Example — after creating a campaign:
21
21
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: "Install Google Ads and Create an Account"
3
- description: "One-time setup for running Google paid ads on a Wix site: install the Wix Google Ads app, then create the Google Ads account that every campaign, suggestion, and analytics call depends on. Covers checking whether an account already exists, choosing a currency, optionally attaching a promotional incentive (credit offer), linking a Google Merchant Center account, and deleting an account. Use when the user wants to 'set up Google Ads', 'connect Google Ads', 'start advertising on Google', 'create a Google Ads account', or hits an ACCOUNT_NOT_FOUND / app-not-installed error before creating a campaign. Google Ads REST API, base https://www.wixapis.com/google-ads/v1."
3
+ description: "One-time setup for running Google paid ads on a Wix site: install the Wix Google Ads app, then create the Google Ads account that every campaign, suggestion, and analytics call depends on. Covers checking whether an account already exists, choosing a currency, optionally attaching a promotional incentive (credit offer), linking a Google Merchant Center account, and deleting an account. Use when the user wants to 'set up Google Ads', 'connect Google Ads', 'start advertising on Google', 'create a Google Ads account', or hits an ACCOUNT_NOT_FOUND / app-not-installed error before creating a campaign. Google Ads REST API, base https://www.wixapis.com/_serverless/pa-google/v1."
4
4
  ---
5
5
  # RECIPE: Install Google Ads and Create an Account
6
6
 
7
7
  Setting up Google Ads on a Wix site is a **strict two-step prerequisite** for everything else in this area: (1) install the Wix Google Ads app, then (2) create the Google Ads account. Campaigns, suggestions, analytics, and billing all fail with `ACCOUNT_NOT_FOUND` (or an app-not-installed error) until both are done. This is a one-time setup per site.
8
8
 
9
- Base URL for all endpoints: `https://www.wixapis.com/google-ads/v1`. The `<AUTH>` placeholder is shorthand for the `Authorization` header; body-bearing calls also need `Content-Type: application/json`.
9
+ Base URL for all endpoints: `https://www.wixapis.com/_serverless/pa-google/v1`. The `<AUTH>` placeholder is shorthand for the `Authorization` header; body-bearing calls also need `Content-Type: application/json`.
10
10
 
11
11
  > **This flow creates a billable advertising account.** Creating the account and launching campaigns spends the site owner's real money. Confirm intent with the user before calling **Create Account**, and surface the chosen currency.
12
12
 
@@ -17,7 +17,7 @@ Base URL for all endpoints: `https://www.wixapis.com/google-ads/v1`. The `<AUTH>
17
17
  Before installing or creating anything, check for an existing account. **Get Account For Current Site** returns an empty response (not an error) when none exists, so it's the safe probe.
18
18
 
19
19
  ```bash
20
- curl -X GET 'https://www.wixapis.com/google-ads/v1/accounts/current-site' -H 'Authorization: <AUTH>'
20
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/accounts/current-site' -H 'Authorization: <AUTH>'
21
21
  ```
22
22
 
23
23
  - **`account` present** → setup is already done. Skip to whatever the user actually wants (create a campaign, view analytics, etc.). Do **not** create a second account — Create Account returns `ACCOUNT_ALREADY_EXISTS`.
@@ -48,7 +48,7 @@ Example response for an existing account:
48
48
  Idempotent — safe to call even if already installed (no effect). Required before Create Account.
49
49
 
50
50
  ```bash
51
- curl -X POST 'https://www.wixapis.com/google-ads/v1/install-if-not-installed' \
51
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/install-if-not-installed' \
52
52
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
53
53
  ```
54
54
 
@@ -61,7 +61,7 @@ Returns `{}`. Always run this before the first Create Account on a site.
61
61
  New accounts in supported currencies can attach an **incentive** — a promotional credit granted after the account spends a threshold. Skip this step for unsupported currencies (the call returns no offers).
62
62
 
63
63
  ```bash
64
- curl -X GET 'https://www.wixapis.com/google-ads/v1/incentives?currency=USD' -H 'Authorization: <AUTH>'
64
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/incentives?currency=USD' -H 'Authorization: <AUTH>'
65
65
  ```
66
66
 
67
67
  Returns up to three tiers (`lowOffer`, `mediumOffer`, `highOffer`), each with an `incentiveId`, an `awardAmount` (credit granted), and a `requiredAmount` (spend needed to unlock it), plus a `consolidatedTermsAndConditionsUrl`. Present the tiers to the user and let them pick; carry the chosen `incentiveId` into STEP 3 as `selectedIncentiveId`. The incentive is recorded now and applied automatically once the account's budget is assigned — there is no separate apply call in this flow.
@@ -73,7 +73,7 @@ Returns up to three tiers (`lowOffer`, `mediumOffer`, `highOffer`), each with an
73
73
  Requires `currency` (ISO-4217, e.g. `USD`). Pass `selectedIncentiveId` if the user picked one in STEP 2. **Confirm with the user before this call** — it provisions a billable account.
74
74
 
75
75
  ```bash
76
- curl -X POST 'https://www.wixapis.com/google-ads/v1/accounts' \
76
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/accounts' \
77
77
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
78
78
  -d '{
79
79
  "currency": "USD",
@@ -107,7 +107,7 @@ The currency choice is durable and drives budget minimums/maximums and manager-a
107
107
  `UpdateAccount` is a partial update — send only the fields you're changing. Merchant Center linking is needed before a retail Performance Max campaign can serve product ads.
108
108
 
109
109
  ```bash
110
- curl -X PATCH 'https://www.wixapis.com/google-ads/v1/accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
110
+ curl -X PATCH 'https://www.wixapis.com/_serverless/pa-google/v1/accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
111
111
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
112
112
  -d '{ "account": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "merchantCenterAccountId": "9876543210" } }'
113
113
  ```
@@ -119,7 +119,7 @@ The response's `merchantCenterAccountLinkStatus.status` starts at `PENDING` —
119
119
  Conversion actions (Purchase, Page View, etc.) are what campaigns optimize toward. To inspect them:
120
120
 
121
121
  ```bash
122
- curl -X GET 'https://www.wixapis.com/google-ads/v1/accounts/current-site/conversion-actions' -H 'Authorization: <AUTH>'
122
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/accounts/current-site/conversion-actions' -H 'Authorization: <AUTH>'
123
123
  ```
124
124
 
125
125
  ### Delete the account
@@ -127,7 +127,7 @@ curl -X GET 'https://www.wixapis.com/google-ads/v1/accounts/current-site/convers
127
127
  `DeleteAccount` unlinks and removes the account. This is destructive and cannot be undone — **always confirm with the user first**, and prefer pausing campaigns over deleting the whole account when the user just wants to stop spending.
128
128
 
129
129
  ```bash
130
- curl -X DELETE 'https://www.wixapis.com/google-ads/v1/accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890' -H 'Authorization: <AUTH>'
130
+ curl -X DELETE 'https://www.wixapis.com/_serverless/pa-google/v1/accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890' -H 'Authorization: <AUTH>'
131
131
  ```
132
132
 
133
133
  Returns `{}`. Errors with `ACCOUNT_NOT_FOUND` if no account exists.
@@ -1,39 +1,45 @@
1
1
  ---
2
2
  name: "Manage a Campaign Success Guide"
3
- description: "Retrieves and manages the campaign success guide for an existing Wix Google Ads Performance Max Leads campaign. Offer it after creating a supported campaign, even while it is learning or has no metrics; that proactive offer requires approval before retrieval. A direct request to improve a campaign, see what to fix next, or show the guide is already approval to retrieve it. Also use when a user reports completing or wants to reopen a guide item. Treat a clear completion report as an actionable update request even when phrased as a statement. Covers campaign selection, prioritized guide retrieval, and suggestion status updates without redundant confirmation. REST base https://www.wixapis.com/pa-platform/suggestions/v1."
3
+ description: "Campaign Success Guide for existing Wix Google Ads Performance Max Leads campaigns. Use after creating a supported campaign, even while it is learning or has no metrics, and whenever users ask how to improve a campaign, what to fix next, to view the guide, or to mark or reopen a recommendation. Covers campaign and site selection; prioritized actionable recommendations; deduplicated, destination-specific Editor and Google Ads navigation; offers to perform supported work after approval; Merchant Center and Business Profile connection follow-ups; and suggestion-status tracking."
4
4
  ---
5
5
  # RECIPE: Manage a Campaign Success Guide
6
6
 
7
- A campaign success guide is a prioritized list of improvements for an **existing** Google Ads `PERFORMANCE_MAX_LEADS` campaign. Offer it as a useful next step after [creating a Performance Max campaign](create-performance-max-campaign.md). Once Create Campaign returns the campaign ID, ask whether the user wants to retrieve the guide; call the API only after they approve. There is no need to wait for the campaign to leave `LEARNING` or generate performance metrics because the guide analyzes the landing page, campaign configuration, and relevant site connections rather than depending on campaign performance data.
8
-
9
- Also use this recipe for requests such as "How can I improve my campaign?", "What should I fix next?", "Show my campaign success guide", "I made the call-to-action button clearer as the success guide recommended", "Mark this recommendation complete", or "Reopen that guide item."
7
+ A campaign success guide is a prioritized list of improvements for an **existing** Google Ads `PERFORMANCE_MAX_LEADS` campaign. Offer it as a useful next step after [creating a Performance Max campaign](create-performance-max-campaign.md). Once Create Campaign returns the campaign ID, ask whether the user wants to retrieve the guide; call the API only after they approve. The guide does not use campaign performance metrics. It evaluates landing-page content, campaign configuration, and Wix site connections, so `LEARNING` status and an empty analytics history do not block it.
10
8
 
11
9
  A direct request to improve a campaign, see what to fix next, or show its success guide is itself approval to retrieve the guide once the campaign is identified. Do not ask whether the user wants the guide after they have already made one of those requests. Separate approval is needed only when you proactively offer the guide after campaign creation.
12
10
 
13
- This differs from [Get AI Campaign Suggestions](get-campaign-suggestions.md), which generates keywords, budgets, locations, copy, images, and other inputs used while **building** a campaign. Do not route pre-campaign keyword, budget, creative, or targeting generation here.
11
+ Treat a broad request such as "How can I improve my Google Ads campaign?" as a Campaign Success Guide request for an existing campaign. Route here before offering generic optimization advice, querying analytics, or generating the pre-campaign inputs covered by Get AI Campaign Suggestions. If the conversation does not identify a Wix site or campaign, explain that you will use the guide and ask one focused question that resolves the missing identity; do not probe site-scoped APIs first.
14
12
 
15
- Base URL: `https://www.wixapis.com/pa-platform/suggestions/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`.
13
+ This differs from [Get AI Campaign Suggestions](get-campaign-suggestions.md), which generates keywords, budgets, locations, copy, images, and other inputs used while **building** a campaign. Do not route pre-campaign keyword, budget, creative, or targeting generation here.
16
14
 
17
15
  ## Resolve the campaign
18
16
 
19
- The guide endpoints require a campaign UUID, but users often provide only a campaign name or say "my campaign."
17
+ The guide endpoints require a campaign UUID, but users often provide only a campaign name or say "my campaign." Google Ads calls operate on the current Wix site from the call context; the site is not a request-body field. Use an already-selected site context without asking the user to repeat it. If there is no unambiguous current site, ask which site to use instead of probing several sites. Follow the rest of this resolution flow only when retrieving or updating a guide. If the conversation already contains the guide recommendations and the user only wants them presented, do not block the action plan on campaign identity; resolve only the site context needed for relevant navigation.
20
18
 
21
- 1. If the user provides a campaign UUID, use it.
22
- 2. Otherwise follow [Manage Campaign Lifecycle](manage-campaign-lifecycle.md) and call:
19
+ Site listing is for resolving navigation metadata only. Never use account-wide site listing to hunt for a campaign before retrieving or updating a guide. A current-site ID in the available context counts as an unambiguous selected site even when the user's prompt does not repeat its name. If no current-site ID is available, ask which site to use.
20
+
21
+ 1. If the campaign UUID is known, use it in the current site context.
22
+ 2. Otherwise, list campaigns once for the current site using the Campaign API's public serverless route:
23
23
 
24
24
  ```bash
25
- curl -X GET 'https://www.wixapis.com/google-ads/v1/campaigns' \
25
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns' \
26
26
  -H 'Authorization: <AUTH>'
27
27
  ```
28
28
 
29
+ Use this full URL exactly once. The `/_serverless/pa-google` prefix is part of the public endpoint. Do not retry with a relative URL or another service prefix, or probe another site when the documented call returns an error.
30
+
29
31
  Read each campaign's `id`, `name`, `campaignType`, and `status`.
30
- 3. Select a campaign only when one result clearly matches the user's wording. If none or multiple plausibly match, show concise choices and ask the user to choose; never guess.
32
+ 3. Select a campaign only when one result clearly matches the user's wording. If several campaigns on that site plausibly match, show concise campaign choices and ask the user to choose; never guess.
31
33
  4. Continue only for `campaignType: "PERFORMANCE_MAX_LEADS"`. If the selected campaign has another type, explain that campaign success guides currently support Google Ads Performance Max Leads campaigns only. For a supported campaign, do not gate guide retrieval on `status` or query analytics first: `LEARNING` and missing performance metrics are not reasons to wait.
32
34
 
33
35
  The common flow always sends `platformType: "GOOGLE"`; do not ask the user to provide it.
34
36
 
35
37
  ## Retrieve or create the guide
36
38
 
39
+ Skip this call when the conversation already contains a retrieved guide or its recommendations; immediately present the supplied result using the next section instead of retrieving it again or asking for campaign identity. When the user paraphrases recommendation labels, map them to the closest unambiguous suggestion types in the translation table. Wording such as "still need to" or "still to do" means those items are `OPEN`.
40
+
41
+ When the user only wants a supplied guide presented, this article already contains the response behavior. Do not read the linked action recipes until the user accepts an offer to perform that action; unnecessary recipe reads delay the answer and can prevent the navigation block from being returned.
42
+
37
43
  ```bash
38
44
  curl -X POST \
39
45
  'https://www.wixapis.com/pa-platform/suggestions/v1/campaign-success-guides/get-or-create' \
@@ -67,6 +73,76 @@ Present only the suggestions the API returns and preserve their order; `suggesti
67
73
 
68
74
  `OPEN` means pending action. `COMPLETED` means the user marked the item completed; it does **not** mean the API changed the site or campaign for them.
69
75
 
76
+ ## Present the guide as an actionable plan
77
+
78
+ Do not return a bare list of task labels. Turn the returned suggestions into a compact action plan while preserving the API's order:
79
+
80
+ Use this output structure:
81
+
82
+ 1. A numbered suggestion list with no navigation URLs or Markdown links inside the suggestion items.
83
+ 2. One grouped offer for the supported work the agent can perform after approval.
84
+ 3. A **Next actions** block after the complete suggestion list and offer, containing each relevant destination link exactly once.
85
+
86
+ This structure is mandatory even when only one suggestion uses a destination. Never put the Editor, Google Ads, or another shared navigation link inline with a suggestion.
87
+
88
+ 1. Name the campaign and link `campaignSuccessGuide.url` as the analyzed landing page when present.
89
+ 2. For every returned suggestion, show its user-facing label, tracking status (`Pending` for `OPEN`, `Marked complete` for `COMPLETED`), and one concrete next step. Do not show enum values unless they help resolve an ambiguity.
90
+ 3. For each `OPEN` item, distinguish work the agent can help perform from work the user must finish in Wix. Prefer an offer to do supported work over instructions that make the user do the same operation manually.
91
+ 4. Do not offer work for `COMPLETED` items unless the user asks to reopen them.
92
+ 5. Put each unique navigation link after the suggestions as a destination-specific CTA. Do not group every URL under a generic **Open in Wix** label or reuse that label for unrelated destinations. Name the actual page or action—for example, **Go to Editor**, **Go to Google Ads**, or **Connect Google Business Profile**. Deduplicate by destination: if two or ten tasks require the Editor, include the Editor CTA **once**, at the bottom, and never repeat it beside individual tasks. Apply the same deduplication to the Google Ads dashboard or any other shared destination.
93
+
94
+ The navigation block is part of the guide, including when the user supplied or paraphrased the recommendations. Before responding, resolve the destinations required by the `OPEN` items. Resolving navigation is read-only and does not require approval, including when the user says not to change anything yet. Use the selected site's `id` and `editUrl` from available site context. If the current-site ID is known but `editUrl` is absent, look up the site's navigation metadata through an available site-listing capability once; select only the result whose `id` or `metaSiteId` exactly matches that current-site ID, then read its `displayName`, `editUrl`, and `editorType`. Do not inspect other sites for campaigns. When no current-site ID is known and the lookup returns exactly one site, use it for navigation. When several sites are available and none is selected, present the action plan immediately and ask which site's CTAs to add. If an item belongs in the Editor or Google Ads, include that destination once unless the destination is genuinely unavailable; do not omit navigation merely because no API call was needed to obtain the guide.
95
+
96
+ ### Which action to offer
97
+
98
+ | Suggestion types | Response behavior |
99
+ | --- | --- |
100
+ | `CLEAR_CTA_COPY`, `ABOVE_THE_FOLD_CTA`, `HEADER_MATCH`, `CONVERSION_POINT`, `GOOGLE_REVIEWS`, `TESTIMONIAL`, `CONTACT_AND_CREDIBILITY`, `FAQ_SECTION`, `MINIMIZE_FORM_FIELDS`, `SOCIAL_CHANNELS` | These change visible landing-page content. Briefly describe the edit and point to the single **Go to Editor** CTA after the suggestions. If the current environment has a site-editing capability that can safely make the specific change, offer to make it after the user approves; otherwise do not imply that marking the suggestion complete will edit the page. |
101
+ | `MOBILE_OPTIMIZATION`, `SITE_SPEED` | Offer to inspect the problem and recommend a concrete fix first; these broad findings are not a safe one-click mutation. Include the single Editor link when the resulting work belongs there. Do not promise an improvement before identifying the actual cause. |
102
+ | `GOOGLE_ADS_SEARCH_THEMES` | Offer to generate relevant search themes, show the proposed set, and apply the approved set to the existing campaign by following [Get AI Campaign Suggestions](get-campaign-suggestions.md) and [Manage Campaign Lifecycle](manage-campaign-lifecycle.md). Updating the campaign is a mutation, so do not apply themes merely because the guide returned this item. |
103
+ | `GOOGLE_MERCHANT_CENTER_CONNECTION` | Offer to link the Merchant Center account using the account flow below. Reuse an already-linked Merchant Center account ID when present; otherwise ask the user for the ID. Get approval before the account update. Explain that the link begins as `PENDING` and its owner may still need to approve it in Google. |
104
+ | `GOOGLE_BUSINESS_PROFILE_CONNECTION` | Offer to check the connection and start it by following [Connect a Wix Site to Google Business Profile](../google-business-profile/connect-google-business-profile.md). Be explicit that the agent can initiate the flow and provide its authorization URL, but the site owner must finish Google's consent in their browser. |
105
+
106
+ After the tasks, make one closing offer that groups the supported actions you can take; do not append a separate approval question to every item.
107
+
108
+ For a Merchant Center connection, first read the selected site's Google Ads account:
109
+
110
+ ```bash
111
+ curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/accounts/current-site' \
112
+ -H 'Authorization: <AUTH>'
113
+ ```
114
+
115
+ Read `account.id`, `account.merchantCenterAccountId`, and `account.merchantCenterAccountLinkStatus`. If `merchantCenterAccountId` is present, use it as the existing connection context. If it is absent, ask the user for the account ID shown in Google Merchant Center; the Google Ads account API does not list candidate Merchant Center accounts. After the user confirms the ID and approves the mutation, follow [Install Google Ads and Create an Account](install-and-create-account.md) and update `merchantCenterAccountId` on `account.id`.
116
+
117
+ ### Build destination-specific CTAs
118
+
119
+ - **Editor:** Include this only when at least one returned `OPEN` item requires landing-page or mobile editing. Use the exact `editUrl` from the selected site context or the single matching result from the site-navigation lookup described above; prefix a relative value with `https://manage.wix.com`. Never construct or guess an Editor URL, and do not substitute the public landing-page URL for an Editor link. If the site is `EDITORLESS` or has no `editUrl`, say that an Editor link is unavailable instead of inventing one. Label the CTA **Go to Editor** or name the more specific editing action; do not label it **Open in Wix**.
120
+ - **Google Ads:** When a returned item belongs in Google Ads, use the verified route from [Google Ads Dashboard Navigation](google-ads-dashboard-navigation.md): `https://manage.wix.com/dashboard/{metaSiteId}/google-ads`. Label the CTA **Go to Google Ads** or name the specific campaign action.
121
+ - **Other destinations:** Name the destination or action in the CTA, such as **Open Forms dashboard**, **Review site speed**, or **Connect Google Business Profile**. Never make several unrelated links look like the same generic action.
122
+ - Include only relevant destinations and list each URL once. Authorization URLs created by a later connection flow are task-specific; return one only after the user accepts that offer and the flow creates it.
123
+
124
+ Example when several tasks share the Editor:
125
+
126
+ ```markdown
127
+ ## Campaign success guide
128
+ Landing page: [Request a quote](https://www.example.com/request-a-quote)
129
+
130
+ 1. **Clarify the main call to action — Pending**
131
+ Make the button describe the conversion, such as “Request a quote.”
132
+ 2. **Move a call to action above the fold — Pending**
133
+ Place the primary button where visitors see it without scrolling.
134
+ 3. **Configure Google Ads search themes — Pending**
135
+ **I can help with this:** I can propose relevant themes and apply the set you approve.
136
+
137
+ I can take care of the search-theme update after you review the proposed set.
138
+
139
+ ### Next actions
140
+ - [Go to Editor]({editUrl})
141
+ - [Go to Google Ads](https://manage.wix.com/dashboard/{metaSiteId}/google-ads)
142
+ ```
143
+
144
+ Each link has its own destination-specific CTA, and the Editor URL appears once even though the first two recommendations both use it.
145
+
70
146
  ## Translate suggestion types for the user
71
147
 
72
148
  Keep the enum value unchanged in API calls, but use these labels when explaining the guide:
@@ -95,9 +171,9 @@ The update endpoint identifies the suggestion by its **`type`**, not its suggest
95
171
 
96
172
  Before executing an update:
97
173
 
98
- 1. Identify the campaign and a suggestion `type` currently present in its latest guide.
174
+ 1. Identify the campaign and a suggestion `type` currently present in its latest guide. Use the current-site ID directly and follow the campaign-resolution flow above; listing that site's campaigns once is valid context resolution, but account-wide site listing is not. Ask one focused site or campaign question only when the current context or campaign results leave more than one plausible target. Do not probe several sites or guess, because the same recommendation type can exist on multiple campaigns.
99
175
  2. Match the user's wording to one returned suggestion and infer the requested status only when it is clear: a statement that they completed the recommendation means `COMPLETED`; a request to reopen it means `OPEN`.
100
- 3. Execute immediately when the campaign, suggestion, and status are unambiguous. Ask one targeted clarification only when any of them is unclear; never guess.
176
+ 3. Execute immediately when the campaign, suggestion, and status are unambiguous. The completion statement is approval for this tracking-status update; do not ask a redundant confirmation question. Ask one targeted clarification only when identity, suggestion, or intended status is unclear; never guess.
101
177
 
102
178
  Mark an item completed:
103
179
 
@@ -112,6 +188,24 @@ curl -X POST \
112
188
  }'
113
189
  ```
114
190
 
191
+ ```json
192
+ {
193
+ "campaignSuccessGuide": {
194
+ "id": "7d4a9c2e-86f1-4b37-a2d5-9e18c6f043ab",
195
+ "suggestions": [
196
+ {
197
+ "type": "CLEAR_CTA_COPY",
198
+ "status": "COMPLETED"
199
+ },
200
+ {
201
+ "type": "FAQ_SECTION",
202
+ "status": "OPEN"
203
+ }
204
+ ]
205
+ }
206
+ }
207
+ ```
208
+
115
209
  Reopen the same item by sending:
116
210
 
117
211
  ```json
@@ -132,7 +226,7 @@ If a mutation times out with an unknown outcome, do not retry automatically. Ret
132
226
  | `PLATFORM_NOT_SUPPORTED` | Use `GOOGLE`; do not substitute another platform value. |
133
227
  | `CAMPAIGN_TYPE_NOT_SUPPORTED` | Explain that success guides currently support Google Ads Performance Max Leads campaigns only. |
134
228
  | `SUGGESTION_NOT_FOUND` | Retrieve the latest guide and choose a `type` actually present; do not keep retrying stale data. |
135
- | Authentication or permission error | Stop after the first rejected campaign or guide call and explain that the current collaborator cannot access or modify it. Do not try alternate base URLs, infer that Google Ads is not installed, or probe other endpoints to bypass authorization. |
229
+ | Authentication or permission error | Stop after the first rejected campaign or guide call and explain that the current collaborator cannot access or modify it. Do not try alternate base URLs, infer that Google Ads is not installed, or probe other sites or endpoints to bypass authorization. |
136
230
 
137
231
  ## References
138
232
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: "Query Campaign Performance Analytics"
3
- description: "Reads performance analytics for a Google Ads campaign on a Wix site: daily performance metrics (impressions, clicks, CTR, cost, leads, phone calls) with optional previous-period comparison and trends; conversion metrics from Wix Analytics (orders, revenue, leads, CPL, ROAS); the search terms that triggered a campaign's ads; per-product shopping performance for retail campaigns; and per-asset performance (headlines, descriptions, images) for PMAX Leads. Explains when to use campaignResourceName vs the Wix campaignId, the dateRange shape, field enums, sorting, and paging. Use when the user asks 'how is my campaign doing', 'show ad performance', 'what search terms triggered my ads', 'which products/assets perform best', 'campaign ROI/ROAS', or 'conversions from my Google ads'. REST base https://www.wixapis.com/google-ads/v1."
3
+ description: "Reads performance analytics for a Google Ads campaign on a Wix site: daily performance metrics (impressions, clicks, CTR, cost, leads, phone calls) with optional previous-period comparison and trends; conversion metrics from Wix Analytics (orders, revenue, leads, CPL, ROAS); the search terms that triggered a campaign's ads; per-product shopping performance for retail campaigns; and per-asset performance (headlines, descriptions, images) for PMAX Leads. Explains when to use campaignResourceName vs the Wix campaignId, the dateRange shape, field enums, sorting, and paging. Use when the user asks 'how is my campaign doing', 'show ad performance', 'what search terms triggered my ads', 'which products/assets perform best', 'campaign ROI/ROAS', or 'conversions from my Google ads'. REST base https://www.wixapis.com/_serverless/pa-google/v1."
4
4
  ---
5
5
  # RECIPE: Query Campaign Performance Analytics
6
6
 
7
7
  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.
8
8
 
9
- 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.
9
+ Base URL: `https://www.wixapis.com/_serverless/pa-google/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.
10
10
 
11
11
  **Two identifiers — get them right:**
12
12
  - **`campaignResourceName`** — the Google Ads resource name `customers/{customerId}/campaigns/{campaignId}` (from `campaign.resourceName`). Used by **Performance Metrics** and **Search Term Metrics (v1)**.
@@ -33,7 +33,7 @@ Both come from Get/List Campaign (see [Manage Campaign Lifecycle](manage-campaig
33
33
  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).
34
34
 
35
35
  ```bash
36
- curl -X POST 'https://www.wixapis.com/google-ads/v1/performance-metrics' \
36
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/performance-metrics' \
37
37
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
38
38
  -d '{
39
39
  "campaignResourceName": "customers/3827461950/campaigns/7412836509",
@@ -60,7 +60,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/performance-metrics' \
60
60
  Business outcomes from **Wix Analytics** (not Google). Both `campaignId` and `dateRange` are **required**. Complex query — 120s SLA.
61
61
 
62
62
  ```bash
63
- curl -X POST 'https://www.wixapis.com/google-ads/v1/conversion-metrics' \
63
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/conversion-metrics' \
64
64
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
65
65
  -d '{ "campaignId": "b3f8e241-7c4a-4d19-a562-9f1e30d87c05", "dateRange": { "custom": { "from": "2026-03-01", "to": "2026-03-31" } } }'
66
66
  ```
@@ -74,7 +74,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/conversion-metrics' \
74
74
  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`.
75
75
 
76
76
  ```bash
77
- curl -X POST 'https://www.wixapis.com/google-ads/v2/search-term-metrics' \
77
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v2/search-term-metrics' \
78
78
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
79
79
  -d '{
80
80
  "campaignId": "b3f8e241-7c4a-4d19-a562-9f1e30d87c05",
@@ -100,7 +100,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v2/search-term-metrics' \
100
100
  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.
101
101
 
102
102
  ```bash
103
- curl -X POST 'https://www.wixapis.com/google-ads/v1/shopping-performance-metrics' \
103
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/shopping-performance-metrics' \
104
104
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
105
105
  -d '{
106
106
  "campaignId": "b3f8e241-7c4a-4d19-a562-9f1e30d87c05",
@@ -119,7 +119,7 @@ Results carry `productTitle`, `productImageUrl`, and the Wix `productId`; the `s
119
119
  Which creative assets perform best. `filter.assetTypes` narrows to specific roles (`HEADLINE`, `DESCRIPTION`, `MARKETING_IMAGE`, …).
120
120
 
121
121
  ```bash
122
- curl -X POST 'https://www.wixapis.com/google-ads/v1/asset-performance-metrics' \
122
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/asset-performance-metrics' \
123
123
  -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
124
124
  -d '{
125
125
  "campaignId": "b3f8e241-7c4a-4d19-a562-9f1e30d87c05",