AdsApp.Recommendation
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads recommendation.
Methods:
apply()
Apply the recommendation.
Note: Some recommendations require additional input. These
recommendations cannot be applied through scripts at this time.
Returns nothing.
getAdGroup()
Return the ad group that this recommendation is for or
null
if
this recommendation is not for a specific ad group.
Return values:
getBaseStats()
Returns the base stats for the account at the time the recommendation was
generated.
Return values:
getCampaign()
Return the campaign that this recommendation is for or
null
if
this recommendation is not for a specific campaign.
Return values:
getEntityType()
Returns the type of this entity as a
String
, in this case,
"Recommendation"
.
Return values:
Type | Description |
String |
Type of this entity: "Recommendation" . |
getPotentialStats()
Returns the estimated stats for the account if the recommendation is
applied.
Return values:
getResourceName()
Returns the resource name of the recommendation.
Return values:
Type | Description |
String |
The resource name of the recommendation. |
Return the shopping ad group that this recommendation is for or
null
if this recommendation is not for a specific shopping ad
group.
Return values:
Return the shopping campaign that this recommendation is for or
null
if this recommendation is not for a specific shopping
campaign.
Return values:
getType()
Returns the type of the recommendation. See
the
Google Ads API documentation for possible values.
Return values:
Type | Description |
String |
The type of the recommendation. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eRepresents a Google Ads recommendation with methods to apply it and retrieve relevant data.\u003c/p\u003e\n"],["\u003cp\u003eProvides access to the recommendation's target (ad group, campaign, shopping ad group, or shopping campaign).\u003c/p\u003e\n"],["\u003cp\u003eOffers insights into the recommendation's impact through base and potential stats.\u003c/p\u003e\n"],["\u003cp\u003eAllows retrieval of the recommendation's type and resource name.\u003c/p\u003e\n"],["\u003cp\u003eCan be applied directly using the \u003ccode\u003eapply()\u003c/code\u003e method, but some recommendations may require additional input and cannot be applied via scripts.\u003c/p\u003e\n"]]],[],null,["# AdsApp.Recommendation\n\nRepresents a Google Ads recommendation.\n\n### Methods:\n\n| Member | Type | Description |\n|-----------------------------------------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [apply()](#apply) | `void` | Apply the recommendation. |\n| [getAdGroup()](#getAdGroup) | [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | Return the ad group that this recommendation is for or `null` if this recommendation is not for a specific ad group. |\n| [getBaseStats()](#getBaseStats) | [AdsApp.RecommendationStats](/google-ads/scripts/docs/reference/adsapp/adsapp_recommendationstats) | Returns the base stats for the account at the time the recommendation was generated. |\n| [getCampaign()](#getCampaign) | [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | Return the campaign that this recommendation is for or `null` if this recommendation is not for a specific campaign. |\n| [getEntityType()](#getEntityType) | `String` | Returns the type of this entity as a `String`, in this case, `\"Recommendation\"`. |\n| [getPotentialStats()](#getPotentialStats) | [AdsApp.RecommendationStats](/google-ads/scripts/docs/reference/adsapp/adsapp_recommendationstats) | Returns the estimated stats for the account if the recommendation is applied. |\n| [getResourceName()](#getResourceName) | `String` | Returns the resource name of the recommendation. |\n| [getShoppingAdGroup()](#getShoppingAdGroup) | [AdsApp.ShoppingAdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup) | Return the shopping ad group that this recommendation is for or `null` if this recommendation is not for a specific shopping ad group. |\n| [getShoppingCampaign()](#getShoppingCampaign) | [AdsApp.ShoppingCampaign](/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingcampaign) | Return the shopping campaign that this recommendation is for or `null` if this recommendation is not for a specific shopping campaign. |\n| [getType()](#getType) | `String` | Returns the type of the recommendation. |\n\n`apply()`\n---------\n\nApply the recommendation.\n\nNote: Some recommendations require additional input. These\nrecommendations cannot be applied through scripts at this time.\n\nReturns nothing.\n\n`getAdGroup()`\n--------------\n\nReturn the ad group that this recommendation is for or `null` if this recommendation is not for a specific ad group.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------|---------------------------------------|\n| [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | The ad group for this recommendation. |\n\n`getBaseStats()`\n----------------\n\nReturns the base stats for the account at the time the recommendation was generated.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|\n| [AdsApp.RecommendationStats](/google-ads/scripts/docs/reference/adsapp/adsapp_recommendationstats) | The base stats for the account at the time the recommendation was generated. |\n\n`getCampaign()`\n---------------\n\nReturn the campaign that this recommendation is for or `null` if this recommendation is not for a specific campaign.\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------|---------------------------------------|\n| [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | The campaign for this recommendation. |\n\n`getEntityType()`\n-----------------\n\nReturns the type of this entity as a `String`, in this case, `\"Recommendation\"`.\n\n### Return values:\n\n| Type | Description |\n|----------|------------------------------------------|\n| `String` | Type of this entity: `\"Recommendation\"`. |\n\n`getPotentialStats()`\n---------------------\n\nReturns the estimated stats for the account if the recommendation is applied.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|\n| [AdsApp.RecommendationStats](/google-ads/scripts/docs/reference/adsapp/adsapp_recommendationstats) | The estimated stats for the account if the recommendation is applied. |\n\n`getResourceName()`\n-------------------\n\nReturns the resource name of the recommendation.\n\n### Return values:\n\n| Type | Description |\n|----------|------------------------------------------|\n| `String` | The resource name of the recommendation. |\n\n`getShoppingAdGroup()`\n----------------------\n\nReturn the shopping ad group that this recommendation is for or `null` if this recommendation is not for a specific shopping ad group.\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|------------------------------------------------|\n| [AdsApp.ShoppingAdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup) | The shopping ad group for this recommendation. |\n\n`getShoppingCampaign()`\n-----------------------\n\nReturn the shopping campaign that this recommendation is for or `null` if this recommendation is not for a specific shopping campaign.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------|------------------------------------------------|\n| [AdsApp.ShoppingCampaign](/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingcampaign) | The shopping campaign for this recommendation. |\n\n`getType()`\n-----------\n\nReturns the type of the recommendation. See [the\nGoogle Ads API documentation](//developers.google.com/google-ads/api/reference/rpc/latest/RecommendationTypeEnum.RecommendationType) for possible values.\n\n### Return values:\n\n| Type | Description |\n|----------|---------------------------------|\n| `String` | The type of the recommendation. |"]]