> 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

# GetRecommendations

# Package: googleAds

# Namespace: SuggestionsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-suggestion-v1/get-recommendations.md

## Permission Scopes:
View google ads campaigns: SCOPE.PROMOTE.VIEW-GOOGLE-ADS

## Introduction

Retrieves Google Ads recommendations for the site's Google Ads account.

Google Ads generates recommendations from an account's settings and recent performance, such as
raising a campaign's budget, adding assets, or fixing Merchant Center issues. Google Ads
regenerates recommendations regularly, so results can change between calls.

Returns only recommendations you can act on through Wix: account-level recommendations and
recommendations for each of the account's campaigns. For the supported types, see `recommendations.type`.
To retrieve only the recommendations for one campaign, specify `campaignId`.

The site must have a Google Ads account. To create one, call
[Create Account](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-account-v1/create-account.md).

---

## REST API

### Schema

```
 Method: getRecommendations
 Description: Retrieves Google Ads recommendations for the site's Google Ads account.  Google Ads generates recommendations from an account's settings and recent performance, such as raising a campaign's budget, adding assets, or fixing Merchant Center issues. Google Ads regenerates recommendations regularly, so results can change between calls.  Returns only recommendations you can act on through Wix: account-level recommendations and recommendations for each of the account's campaigns. For the supported types, see `recommendations.type`. To retrieve only the recommendations for one campaign, specify `campaignId`.  The site must have a Google Ads account. To create one, call [Create Account](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-account-v1/create-account.md).
 URL: https://www.wixapis.com/_serverless/pa-google/v1/recommendations
 Method: GET
 Method parameters:
   query param name: campaignId | type: campaignId | description: GUID of the campaign to retrieve recommendations for. When specified, only recommendations that apply to this campaign are returned, and account-level recommendations are excluded. When not specified, all recommendations are returned.  | validation: format GUID
 Return type: GetRecommendationsResponse
  - name: recommendations | type: array<Recommendation> | description: Retrieved recommendations, in no particular order. Max: 500 recommendations.  | validation: maxItems 500
     - name: type | type: string | description: Recommendation type, as defined by the Google Ads API.  Supported values: - Budget: `CAMPAIGN_BUDGET`, `FORECASTING_CAMPAIGN_BUDGET`, `MARGINAL_ROI_CAMPAIGN_BUDGET`. To act on these, change the campaign's budget with [Update Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/update-campaign.md). - Assets and settings: `IMPROVE_PERFORMANCE_MAX_AD_STRENGTH` and `PERFORMANCE_MAX_FINAL_URL_OPT_IN` for Performance Max Leads campaigns, and `CALL_ASSET` for Performance Max Leads and Smart campaigns. To act on these, update the campaign's assets, asset automation settings, or phone number with Update Campaign. `CALL_ASSET` is also returned for every published Performance Max Leads campaign that has no phone number, even when Google Ads doesn't recommend it. In that case, it has no `impact` or `details`. - Shopping: `SHOPPING_ADD_AGE_GROUP`, `SHOPPING_ADD_COLOR`, `SHOPPING_ADD_GENDER`, `SHOPPING_ADD_GTIN`, `SHOPPING_ADD_MORE_IDENTIFIERS`, `SHOPPING_ADD_SIZE`, `SHOPPING_ADD_PRODUCTS_TO_CAMPAIGN`, `SHOPPING_FIX_DISAPPROVED_PRODUCTS`, `SHOPPING_FIX_SUSPENDED_MERCHANT_CENTER_ACCOUNT`, and `SHOPPING_FIX_MERCHANT_CENTER_ACCOUNT_SUSPENSION_WARNING`, for Performance Max campaigns that sell products. These are fixed in Wix Stores or in Google Merchant Center, not through the Google Ads APIs. - Account: `PERFORMANCE_MAX_OPT_IN`, a recommendation to start using Performance Max campaigns. To act on it, create a Performance Max campaign with [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md).  For a description of each type, see [RecommendationType](https://developers.google.com/google-ads/api/reference/rpc/latest/RecommendationTypeEnum.RecommendationType) in the Google Ads API reference.  | validation: maxLength 100
     - name: campaignIds | type: array<string> | description: IDs of the campaigns the recommendation applies to. Empty for account-level recommendations, such as `PERFORMANCE_MAX_OPT_IN`. Max: 100 campaigns.  | validation: maxItems 100, format GUID
     - name: impact | type: BudgetRecommendationImpact | description: Estimated performance before and after applying the recommendation. Returned only when Google Ads provides an estimate.  
        - name: baseMetrics | type: BudgetRecommendationMetrics | description: Estimated performance with the current settings.  
           - name: impressions | type: number | description: Estimated number of ad impressions.  | validation: format double
           - name: clicks | type: number | description: Estimated number of clicks.  | validation: format double
           - name: costMicros | type: string | description: Estimated spend in micros (1,000,000 micros = 1 currency unit).  | validation: format int64
           - name: conversions | type: number | description: Estimated number of conversions.  | validation: format double
           - name: conversionsValue | type: number | description: Estimated total monetary value of all conversions, such as revenue from purchases or sign-ups.  | validation: format double
        - name: potentialMetrics | type: BudgetRecommendationMetrics | description: Estimated performance after the change.  
     - name: details | type: object | description: Type-specific details of the recommendation, in the Google Ads API JSON format: the value of the Google Ads `Recommendation` field for this type. For example, for `CAMPAIGN_BUDGET`, a [CampaignBudgetRecommendation](https://developers.google.com/google-ads/api/reference/rpc/latest/Recommendation.CampaignBudgetRecommendation) object. Google Ads defines the structure of this object, and it can change when Google Ads updates its API.  Amounts in micros (fields ending in `Micros`) are in the account's currency, where 1,000,000 micros equal 1 currency unit, and are returned as strings.  For `IMPROVE_PERFORMANCE_MAX_AD_STRENGTH`, also includes `assetCoverage`: the asset group's [AssetCoverage](https://developers.google.com/google-ads/api/reference/rpc/latest/AssetCoverage) object, which lists the asset field types and number of assets to add to improve its ad strength. It lists only text and image asset types, which you can add with Update Campaign. `assetCoverage` is returned only when Google Ads provides it.  Returned only for types that have details.  

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: CAMPAIGN_NOT_FOUND | Description: Couldn't find the campaign.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACCOUNT_NOT_FOUND | Description: Couldn't find the site's Google Ads account.


```

### Examples

### Get recommendations for the account
Retrieves the recommendations for each of the account's campaigns.

```curl
curl -X GET \
'https://www.wixapis.com/_serverless/pa-google/v1/recommendations' \
-H 'Authorization: <AUTH>'
```

### Get recommendations for a campaign
Retrieves only the recommendations that apply to the specified campaign.

```curl
curl -X GET \
'https://www.wixapis.com/_serverless/pa-google/v1/recommendations?campaignId=0b6c8f3e-2a41-4d7e-9c1a-5f2e8d4b7a10' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGoogleAds.suggestions.getRecommendations(options)
 Description: Retrieves Google Ads recommendations for the site's Google Ads account.  Google Ads generates recommendations from an account's settings and recent performance, such as raising a campaign's budget, adding assets, or fixing Merchant Center issues. Google Ads regenerates recommendations regularly, so results can change between calls.  Returns only recommendations you can act on through Wix: account-level recommendations and recommendations for each of the account's campaigns. For the supported types, see `recommendations.type`. To retrieve only the recommendations for one campaign, specify `campaignId`.  The site must have a Google Ads account. To create one, call [Create Account](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-account-v1/create-account.md).
 Method parameters:
   param name: options | type: GetRecommendationsOptions  none  
        - name: campaignId | type: string | description: GUID of the campaign to retrieve recommendations for. When specified, only recommendations that apply to this campaign are returned, and account-level recommendations are excluded. When not specified, all recommendations are returned.  | validation: format GUID
 Return type: PROMISE<GetRecommendationsResponse>
  - name: recommendations | type: array<Recommendation> | description: Retrieved recommendations, in no particular order. Max: 500 recommendations.  | validation: maxItems 500
     - name: type | type: string | description: Recommendation type, as defined by the Google Ads API.  Supported values: - Budget: `CAMPAIGN_BUDGET`, `FORECASTING_CAMPAIGN_BUDGET`, `MARGINAL_ROI_CAMPAIGN_BUDGET`. To act on these, change the campaign's budget with [Update Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/update-campaign.md). - Assets and settings: `IMPROVE_PERFORMANCE_MAX_AD_STRENGTH` and `PERFORMANCE_MAX_FINAL_URL_OPT_IN` for Performance Max Leads campaigns, and `CALL_ASSET` for Performance Max Leads and Smart campaigns. To act on these, update the campaign's assets, asset automation settings, or phone number with Update Campaign. `CALL_ASSET` is also returned for every published Performance Max Leads campaign that has no phone number, even when Google Ads doesn't recommend it. In that case, it has no `impact` or `details`. - Shopping: `SHOPPING_ADD_AGE_GROUP`, `SHOPPING_ADD_COLOR`, `SHOPPING_ADD_GENDER`, `SHOPPING_ADD_GTIN`, `SHOPPING_ADD_MORE_IDENTIFIERS`, `SHOPPING_ADD_SIZE`, `SHOPPING_ADD_PRODUCTS_TO_CAMPAIGN`, `SHOPPING_FIX_DISAPPROVED_PRODUCTS`, `SHOPPING_FIX_SUSPENDED_MERCHANT_CENTER_ACCOUNT`, and `SHOPPING_FIX_MERCHANT_CENTER_ACCOUNT_SUSPENSION_WARNING`, for Performance Max campaigns that sell products. These are fixed in Wix Stores or in Google Merchant Center, not through the Google Ads APIs. - Account: `PERFORMANCE_MAX_OPT_IN`, a recommendation to start using Performance Max campaigns. To act on it, create a Performance Max campaign with [Create Campaign](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/campaign-v1/create-campaign.md).  For a description of each type, see [RecommendationType](https://developers.google.com/google-ads/api/reference/rpc/latest/RecommendationTypeEnum.RecommendationType) in the Google Ads API reference.  | validation: maxLength 100
     - name: campaignIds | type: array<string> | description: IDs of the campaigns the recommendation applies to. Empty for account-level recommendations, such as `PERFORMANCE_MAX_OPT_IN`. Max: 100 campaigns.  | validation: maxItems 100, format GUID
     - name: impact | type: BudgetRecommendationImpact | description: Estimated performance before and after applying the recommendation. Returned only when Google Ads provides an estimate.  
        - name: baseMetrics | type: BudgetRecommendationMetrics | description: Estimated performance with the current settings.  
           - name: impressions | type: number | description: Estimated number of ad impressions.  
           - name: clicks | type: number | description: Estimated number of clicks.  
           - name: costMicros | type: string | description: Estimated spend in micros (1,000,000 micros = 1 currency unit).  | validation: format int64
           - name: conversions | type: number | description: Estimated number of conversions.  
           - name: conversionsValue | type: number | description: Estimated total monetary value of all conversions, such as revenue from purchases or sign-ups.  
        - name: potentialMetrics | type: BudgetRecommendationMetrics | description: Estimated performance after the change.  
     - name: details | type: object | description: Type-specific details of the recommendation, in the Google Ads API JSON format: the value of the Google Ads `Recommendation` field for this type. For example, for `CAMPAIGN_BUDGET`, a [CampaignBudgetRecommendation](https://developers.google.com/google-ads/api/reference/rpc/latest/Recommendation.CampaignBudgetRecommendation) object. Google Ads defines the structure of this object, and it can change when Google Ads updates its API.  Amounts in micros (fields ending in `Micros`) are in the account's currency, where 1,000,000 micros equal 1 currency unit, and are returned as strings.  For `IMPROVE_PERFORMANCE_MAX_AD_STRENGTH`, also includes `assetCoverage`: the asset group's [AssetCoverage](https://developers.google.com/google-ads/api/reference/rpc/latest/AssetCoverage) object, which lists the asset field types and number of assets to add to improve its ad strength. It lists only text and image asset types, which you can add with Update Campaign. `assetCoverage` is returned only when Google Ads provides it.  Returned only for types that have details.  

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: CAMPAIGN_NOT_FOUND | Description: Couldn't find the campaign.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACCOUNT_NOT_FOUND | Description: Couldn't find the site's Google Ads account.


```

### Examples

### Get Google Ads recommendations for a campaign
```javascript
import { suggestions } from "@wix/promote-google-ads";

async function getRecommendations() {
  const response = await suggestions.getRecommendations({
    campaignId: "0b6c8f3e-2a41-4d7e-9c1a-5f2e8d4b7a10",
  });
}

/* Promise resolves to:
 * {
 *   "recommendations": [
 *     {
 *       "type": "IMPROVE_PERFORMANCE_MAX_AD_STRENGTH",
 *       "campaignIds": [
 *         "0b6c8f3e-2a41-4d7e-9c1a-5f2e8d4b7a10"
 *       ],
 *       "details": {
 *         "assetGroup": "customers/1234567890/assetGroups/2345678901",
 *         "adStrength": "AVERAGE",
 *         "assetCoverage": {
 *           "adStrengthActionItems": [
 *             {
 *               "actionItemType": "ADD_ASSET",
 *               "addAssetDetails": {
 *                 "assetFieldType": "MARKETING_IMAGE",
 *                 "assetCount": 3
 *               }
 *             },
 *             {
 *               "actionItemType": "ADD_ASSET",
 *               "addAssetDetails": {
 *                 "assetFieldType": "SQUARE_MARKETING_IMAGE",
 *                 "assetCount": 3
 *               }
 *             }
 *           ]
 *         }
 *       }
 *     },
 *     {
 *       "type": "PERFORMANCE_MAX_FINAL_URL_OPT_IN",
 *       "campaignIds": [
 *         "0b6c8f3e-2a41-4d7e-9c1a-5f2e8d4b7a10"
 *       ]
 *     }
 *   ]
 * }
 */

```

### getRecommendations (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { suggestions } from '@wix/promote-google-ads';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { suggestions },
  // Include the auth strategy and host as relevant
});


async function getRecommendations(options) {
  const response = await myWixClient.suggestions.getRecommendations(options);
};
```

---