Close httplib2 connections.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates, or removes ad groups. Operation statuses are returned. List of thrown errors: [AdGroupError]() [AdxError]() [AuthenticationError]() [AuthorizationError]() [BiddingError]() [BiddingStrategyError]() [DatabaseError]() [DateError]() [DistinctError]() [FieldError]() [FieldMaskError]() [HeaderError]() [IdError]() [InternalError]() [ListOperationError]() [MultiplierError]() [MutateError]() [NewResourceCreationError]() [NotEmptyError]() [NullError]() [OperationAccessDeniedError]() [OperatorError]() [QuotaError]() [RangeError]() [RequestError]() [ResourceCountLimitExceededError]() [SettingError]() [SizeLimitError]() [StringFormatError]() [StringLengthError]() [UrlFieldError]()
close()
Close httplib2 connections.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates, or removes ad groups. Operation statuses are returned. List of thrown errors: [AdGroupError]() [AdxError]() [AuthenticationError]() [AuthorizationError]() [BiddingError]() [BiddingStrategyError]() [DatabaseError]() [DateError]() [DistinctError]() [FieldError]() [FieldMaskError]() [HeaderError]() [IdError]() [InternalError]() [ListOperationError]() [MultiplierError]() [MutateError]() [NewResourceCreationError]() [NotEmptyError]() [NullError]() [OperationAccessDeniedError]() [OperatorError]() [QuotaError]() [RangeError]() [RequestError]() [ResourceCountLimitExceededError]() [SettingError]() [SizeLimitError]() [StringFormatError]() [StringLengthError]() [UrlFieldError]()
Args:
customerId: string, Required. The ID of the customer whose ad groups are being modified. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AdGroupService.MutateAdGroups.
"operations": [ # Required. The list of operations to perform on individual ad groups.
{ # A single operation (create, update, remove) on an ad group.
"create": { # An ad group. # Create operation: No resource name is expected for the new ad group.
"adRotationMode": "A String", # The ad rotation mode of the ad group.
"aiMaxAdGroupSetting": { # Settings for AI Max feature in standard search adgroups. # Settings for AI Max feature in standard search adgroups.
"disableSearchTermMatching": True or False, # Disable search term matching for this adgroup when AI Max is enabled. Search term matching uses broad match, asset-based, and landing page-based technology to improve reach.
},
"audienceSetting": { # Settings for the audience targeting. # Immutable. Setting for audience related features.
"useAudienceGrouped": True or False, # Immutable. If true, this ad group uses an Audience resource for audience targeting. If false, this ad group may use audience segment criteria instead.
},
"baseAdGroup": "A String", # Output only. For draft or experiment ad groups, this field is the resource name of the base ad group from which this ad group was created. If a draft or experiment ad group does not have a base ad group, then this field is null. For base ad groups, this field equals the ad group resource name. This field is read-only.
"campaign": "A String", # Immutable. The campaign to which the ad group belongs.
"cpcBidMicros": "A String", # The maximum CPC (cost-per-click) bid. This field is used when the ad group's effective bidding strategy is Manual CPC. This field is not applicable and will be ignored if the ad group's campaign is using a portfolio bidding strategy.
"cpmBidMicros": "A String", # The maximum CPM (cost-per-thousand viewable impressions) bid.
"cpvBidMicros": "A String", # The CPV (cost-per-view) bid.
"creationTime": "A String", # Output only. The timestamp when this ad_group was created. The timestamp is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss" format.
"demandGenAdGroupSettings": { # Settings for Demand Gen ad groups. # Settings for Demand Gen ad groups.
"channelControls": { # Channel controls for Demand Gen ad groups. # Channel controls for Demand Gen ad groups.
"channelConfig": "A String", # Output only. Channel configuration reflecting which field in the oneof is populated.
"channelStrategy": "A String", # High level channel strategy.
"selectedChannels": { # Explicitly selected channels for channel controls in Demand Gen ad groups. # Explicitly selected channels. This field should be set with at least one true value when present.
"discover": True or False, # Whether to enable ads on the Discover channel.
"display": True or False, # Whether to enable ads on the Display channel.
"gmail": True or False, # Whether to enable ads on the Gmail channel.
"youtubeInFeed": True or False, # Whether to enable ads on the YouTube In-Feed channel.
"youtubeInStream": True or False, # Whether to enable ads on the YouTube In-Stream channel.
"youtubeShorts": True or False, # Whether to enable ads on the YouTube Shorts channel.
},
},
},
"displayCustomBidDimension": "A String", # Lets advertisers specify a targeting dimension on which to place absolute bids. This is only applicable for campaigns that target only the display network and not search.
"effectiveCpcBidMicros": "A String", # Output only. Value will be same as that of the CPC (cost-per-click) bid value when the bidding strategy is one of manual cpc, enhanced cpc, page one promoted or target outrank share, otherwise the value will be null.
"effectiveLabels": [ # Output only. The resource names of effective labels attached to this ad group. An effective label is a label inherited or directly assigned to this ad group.
"A String",
],
"effectiveTargetCpaMicros": "A String", # Output only. The effective target CPA (cost-per-acquisition). This field is read-only.
"effectiveTargetCpaSource": "A String", # Output only. Source of the effective target CPA. This field is read-only.
"effectiveTargetCpc": "A String", # Output only. The effective target CPC (cost-per-click). This field is read-only.
"effectiveTargetCpcSource": "A String", # Output only. Source of the effective target CPC. This field is read-only.
"effectiveTargetRoas": 3.14, # Output only. The effective target ROAS (return-on-ad-spend). This field is read-only.
"effectiveTargetRoasSource": "A String", # Output only. Source of the effective target ROAS. This field is read-only.
"endDate": "A String", # Output only. Date when the ad group ends serving ads. By default, the ad group ends on the ad group's end date. If this field is set, then the ad group ends at the end of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14
"engineId": "A String", # Output only. ID of the ad group in the external engine account. This field is for non-Google Ads account only, for example, Yahoo Japan, Microsoft, Baidu etc. For Google Ads entity, use "ad_group.id" instead.
"engineStatus": "A String", # Output only. The Engine Status for ad group.
"excludeDemographicExpansion": True or False, # When this value is true, demographics will be excluded from the types of targeting which are expanded when optimized_targeting_enabled is true. When optimized_targeting_enabled is false, this field is ignored. Default is false.
"excludedParentAssetFieldTypes": [ # The asset field types that should be excluded from this ad group. Asset links with these field types will not be inherited by this ad group from the upper levels.
"A String",
],
"excludedParentAssetSetTypes": [ # The asset set types that should be excluded from this ad group. Asset set links with these types will not be inherited by this ad group from the upper levels. Location group types (GMB_DYNAMIC_LOCATION_GROUP, CHAIN_DYNAMIC_LOCATION_GROUP, and STATIC_LOCATION_GROUP) are child types of LOCATION_SYNC. Therefore, if LOCATION_SYNC is set for this field, all location group asset sets are not allowed to be linked to this ad group, and all Location Extension (LE) and Affiliate Location Extensions (ALE) will not be served under this ad group. Only LOCATION_SYNC is currently supported.
"A String",
],
"finalUrlSuffix": "A String", # URL template for appending params to Final URL.
"fixedCpmMicros": "A String", # The fixed amount in micros that the advertiser pays for every thousand impressions of the ad.
"id": "A String", # Output only. The ID of the ad group.
"labels": [ # Output only. The resource names of labels attached to this ad group.
"A String",
],
"languageCode": "A String", # Output only. The language of the ads and keywords in an ad group. This field is only available for Microsoft Advertising accounts. More details: https://docs.microsoft.com/en-us/advertising/guides/ad-languages?view=bingads-13#adlanguage
"lastModifiedTime": "A String", # Output only. The datetime when this ad group was last modified. The datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
"name": "A String", # The name of the ad group. This field is required and should not be empty when creating new ad groups. It must contain fewer than 255 UTF-8 full-width characters. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.
"optimizedTargetingEnabled": True or False, # True if optimized targeting is enabled. Optimized Targeting is the replacement for Audience Expansion.
"percentCpcBidMicros": "A String", # The percent cpc bid amount, expressed as a fraction of the advertised price for some good or service. The valid range for the fraction is [0,1) and the value stored here is 1,000,000 * [fraction].
"primaryStatus": "A String", # Output only. Provides aggregated view into why an ad group is not serving or not serving optimally.
"primaryStatusReasons": [ # Output only. Provides reasons for why an ad group is not serving or not serving optimally.
"A String",
],
"resourceName": "A String", # Immutable. The resource name of the ad group. Ad group resource names have the form: `customers/{customer_id}/adGroups/{ad_group_id}`
"startDate": "A String", # Output only. Date when this ad group starts serving ads. By default, the ad group starts now or the ad group's start date, whichever is later. If this field is set, then the ad group starts at the beginning of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14
"status": "A String", # The status of the ad group.
"targetCpaMicros": "A String", # The target CPA (cost-per-acquisition). If the ad group's campaign bidding strategy is TargetCpa or MaximizeConversions (with its target_cpa field set), then this field overrides the target CPA specified in the campaign's bidding strategy. Otherwise, this value is ignored.
"targetCpcMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every ad click. Overrides the target CPC configured at the campaign level.
"targetCpmMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every thousand times the ad is shown.
"targetCpvMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every ad view.
"targetRoas": 3.14, # The target ROAS (return-on-ad-spend) for this ad group. This field lets you override the target ROAS specified in the campaign's bidding strategy, but only if the campaign is using a standard (not portfolio) `TargetRoas` strategy or a standard `MaximizeConversionValue` strategy with its `target_roas` field set. If the campaign is using a portfolio bidding strategy, this field cannot be set and attempting to do so will result in an error. For any other bidding strategies, this value is ignored. To see the actual target ROAS being used by the ad group, considering potential overrides, query the `effective_target_roas` and `effective_target_roas_source` fields.
"targetingSetting": { # Settings for the targeting-related features, at the campaign and ad group levels. For more details about the targeting setting, visit https://support.google.com/google-ads/answer/7365594 # Setting for targeting related features.
"targetRestrictionOperations": [ # The list of operations changing the target restrictions. Adding a target restriction with a targeting dimension that already exists causes the existing target restriction to be replaced with the new value.
{ # Operation to be performed on a target restriction list in a mutate.
"operator": "A String", # Type of list operation to perform.
"value": { # The list of per-targeting-dimension targeting settings. # The target restriction being added to or removed from the list.
"bidOnly": True or False, # Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.
"targetingDimension": "A String", # The targeting dimension that these settings apply to.
},
},
],
"targetRestrictions": [ # The per-targeting-dimension setting to restrict the reach of your campaign or ad group.
{ # The list of per-targeting-dimension targeting settings.
"bidOnly": True or False, # Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.
"targetingDimension": "A String", # The targeting dimension that these settings apply to.
},
],
},
"trackingUrlTemplate": "A String", # The URL template for constructing a tracking URL.
"type": "A String", # Immutable. The type of the ad group.
"urlCustomParameters": [ # The list of mappings used to substitute custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
{ # A mapping that can be used by custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
"key": "A String", # The key matching the parameter tag name.
"value": "A String", # The value to be substituted.
},
],
"verticalAdsFormatSetting": { # Vertical ads setting feature to enable/disable ad group format controls in search campaigns. # Vertical ads setting feature to enable/disable ad group format controls in search campaigns. This setting requires AiMaxAdGroupSetting to be enabled and a travel feed to be attached to the campaign.
"disableTextAds": True or False, # If true, text ads will be disabled for this ad group.
"enableBookingLinks": True or False, # If true, booking links will be enabled for this ad group.
"enableVerticalPromotionAds": True or False, # If true, vertical promotion ads will be enabled for this ad group.
},
},
"remove": "A String", # Remove operation: A resource name for the removed ad group is expected, in this format: `customers/{customer_id}/adGroups/{ad_group_id}`
"update": { # An ad group. # Update operation: The ad group is expected to have a valid resource name.
"adRotationMode": "A String", # The ad rotation mode of the ad group.
"aiMaxAdGroupSetting": { # Settings for AI Max feature in standard search adgroups. # Settings for AI Max feature in standard search adgroups.
"disableSearchTermMatching": True or False, # Disable search term matching for this adgroup when AI Max is enabled. Search term matching uses broad match, asset-based, and landing page-based technology to improve reach.
},
"audienceSetting": { # Settings for the audience targeting. # Immutable. Setting for audience related features.
"useAudienceGrouped": True or False, # Immutable. If true, this ad group uses an Audience resource for audience targeting. If false, this ad group may use audience segment criteria instead.
},
"baseAdGroup": "A String", # Output only. For draft or experiment ad groups, this field is the resource name of the base ad group from which this ad group was created. If a draft or experiment ad group does not have a base ad group, then this field is null. For base ad groups, this field equals the ad group resource name. This field is read-only.
"campaign": "A String", # Immutable. The campaign to which the ad group belongs.
"cpcBidMicros": "A String", # The maximum CPC (cost-per-click) bid. This field is used when the ad group's effective bidding strategy is Manual CPC. This field is not applicable and will be ignored if the ad group's campaign is using a portfolio bidding strategy.
"cpmBidMicros": "A String", # The maximum CPM (cost-per-thousand viewable impressions) bid.
"cpvBidMicros": "A String", # The CPV (cost-per-view) bid.
"creationTime": "A String", # Output only. The timestamp when this ad_group was created. The timestamp is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss" format.
"demandGenAdGroupSettings": { # Settings for Demand Gen ad groups. # Settings for Demand Gen ad groups.
"channelControls": { # Channel controls for Demand Gen ad groups. # Channel controls for Demand Gen ad groups.
"channelConfig": "A String", # Output only. Channel configuration reflecting which field in the oneof is populated.
"channelStrategy": "A String", # High level channel strategy.
"selectedChannels": { # Explicitly selected channels for channel controls in Demand Gen ad groups. # Explicitly selected channels. This field should be set with at least one true value when present.
"discover": True or False, # Whether to enable ads on the Discover channel.
"display": True or False, # Whether to enable ads on the Display channel.
"gmail": True or False, # Whether to enable ads on the Gmail channel.
"youtubeInFeed": True or False, # Whether to enable ads on the YouTube In-Feed channel.
"youtubeInStream": True or False, # Whether to enable ads on the YouTube In-Stream channel.
"youtubeShorts": True or False, # Whether to enable ads on the YouTube Shorts channel.
},
},
},
"displayCustomBidDimension": "A String", # Lets advertisers specify a targeting dimension on which to place absolute bids. This is only applicable for campaigns that target only the display network and not search.
"effectiveCpcBidMicros": "A String", # Output only. Value will be same as that of the CPC (cost-per-click) bid value when the bidding strategy is one of manual cpc, enhanced cpc, page one promoted or target outrank share, otherwise the value will be null.
"effectiveLabels": [ # Output only. The resource names of effective labels attached to this ad group. An effective label is a label inherited or directly assigned to this ad group.
"A String",
],
"effectiveTargetCpaMicros": "A String", # Output only. The effective target CPA (cost-per-acquisition). This field is read-only.
"effectiveTargetCpaSource": "A String", # Output only. Source of the effective target CPA. This field is read-only.
"effectiveTargetCpc": "A String", # Output only. The effective target CPC (cost-per-click). This field is read-only.
"effectiveTargetCpcSource": "A String", # Output only. Source of the effective target CPC. This field is read-only.
"effectiveTargetRoas": 3.14, # Output only. The effective target ROAS (return-on-ad-spend). This field is read-only.
"effectiveTargetRoasSource": "A String", # Output only. Source of the effective target ROAS. This field is read-only.
"endDate": "A String", # Output only. Date when the ad group ends serving ads. By default, the ad group ends on the ad group's end date. If this field is set, then the ad group ends at the end of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14
"engineId": "A String", # Output only. ID of the ad group in the external engine account. This field is for non-Google Ads account only, for example, Yahoo Japan, Microsoft, Baidu etc. For Google Ads entity, use "ad_group.id" instead.
"engineStatus": "A String", # Output only. The Engine Status for ad group.
"excludeDemographicExpansion": True or False, # When this value is true, demographics will be excluded from the types of targeting which are expanded when optimized_targeting_enabled is true. When optimized_targeting_enabled is false, this field is ignored. Default is false.
"excludedParentAssetFieldTypes": [ # The asset field types that should be excluded from this ad group. Asset links with these field types will not be inherited by this ad group from the upper levels.
"A String",
],
"excludedParentAssetSetTypes": [ # The asset set types that should be excluded from this ad group. Asset set links with these types will not be inherited by this ad group from the upper levels. Location group types (GMB_DYNAMIC_LOCATION_GROUP, CHAIN_DYNAMIC_LOCATION_GROUP, and STATIC_LOCATION_GROUP) are child types of LOCATION_SYNC. Therefore, if LOCATION_SYNC is set for this field, all location group asset sets are not allowed to be linked to this ad group, and all Location Extension (LE) and Affiliate Location Extensions (ALE) will not be served under this ad group. Only LOCATION_SYNC is currently supported.
"A String",
],
"finalUrlSuffix": "A String", # URL template for appending params to Final URL.
"fixedCpmMicros": "A String", # The fixed amount in micros that the advertiser pays for every thousand impressions of the ad.
"id": "A String", # Output only. The ID of the ad group.
"labels": [ # Output only. The resource names of labels attached to this ad group.
"A String",
],
"languageCode": "A String", # Output only. The language of the ads and keywords in an ad group. This field is only available for Microsoft Advertising accounts. More details: https://docs.microsoft.com/en-us/advertising/guides/ad-languages?view=bingads-13#adlanguage
"lastModifiedTime": "A String", # Output only. The datetime when this ad group was last modified. The datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
"name": "A String", # The name of the ad group. This field is required and should not be empty when creating new ad groups. It must contain fewer than 255 UTF-8 full-width characters. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.
"optimizedTargetingEnabled": True or False, # True if optimized targeting is enabled. Optimized Targeting is the replacement for Audience Expansion.
"percentCpcBidMicros": "A String", # The percent cpc bid amount, expressed as a fraction of the advertised price for some good or service. The valid range for the fraction is [0,1) and the value stored here is 1,000,000 * [fraction].
"primaryStatus": "A String", # Output only. Provides aggregated view into why an ad group is not serving or not serving optimally.
"primaryStatusReasons": [ # Output only. Provides reasons for why an ad group is not serving or not serving optimally.
"A String",
],
"resourceName": "A String", # Immutable. The resource name of the ad group. Ad group resource names have the form: `customers/{customer_id}/adGroups/{ad_group_id}`
"startDate": "A String", # Output only. Date when this ad group starts serving ads. By default, the ad group starts now or the ad group's start date, whichever is later. If this field is set, then the ad group starts at the beginning of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14
"status": "A String", # The status of the ad group.
"targetCpaMicros": "A String", # The target CPA (cost-per-acquisition). If the ad group's campaign bidding strategy is TargetCpa or MaximizeConversions (with its target_cpa field set), then this field overrides the target CPA specified in the campaign's bidding strategy. Otherwise, this value is ignored.
"targetCpcMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every ad click. Overrides the target CPC configured at the campaign level.
"targetCpmMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every thousand times the ad is shown.
"targetCpvMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every ad view.
"targetRoas": 3.14, # The target ROAS (return-on-ad-spend) for this ad group. This field lets you override the target ROAS specified in the campaign's bidding strategy, but only if the campaign is using a standard (not portfolio) `TargetRoas` strategy or a standard `MaximizeConversionValue` strategy with its `target_roas` field set. If the campaign is using a portfolio bidding strategy, this field cannot be set and attempting to do so will result in an error. For any other bidding strategies, this value is ignored. To see the actual target ROAS being used by the ad group, considering potential overrides, query the `effective_target_roas` and `effective_target_roas_source` fields.
"targetingSetting": { # Settings for the targeting-related features, at the campaign and ad group levels. For more details about the targeting setting, visit https://support.google.com/google-ads/answer/7365594 # Setting for targeting related features.
"targetRestrictionOperations": [ # The list of operations changing the target restrictions. Adding a target restriction with a targeting dimension that already exists causes the existing target restriction to be replaced with the new value.
{ # Operation to be performed on a target restriction list in a mutate.
"operator": "A String", # Type of list operation to perform.
"value": { # The list of per-targeting-dimension targeting settings. # The target restriction being added to or removed from the list.
"bidOnly": True or False, # Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.
"targetingDimension": "A String", # The targeting dimension that these settings apply to.
},
},
],
"targetRestrictions": [ # The per-targeting-dimension setting to restrict the reach of your campaign or ad group.
{ # The list of per-targeting-dimension targeting settings.
"bidOnly": True or False, # Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.
"targetingDimension": "A String", # The targeting dimension that these settings apply to.
},
],
},
"trackingUrlTemplate": "A String", # The URL template for constructing a tracking URL.
"type": "A String", # Immutable. The type of the ad group.
"urlCustomParameters": [ # The list of mappings used to substitute custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
{ # A mapping that can be used by custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
"key": "A String", # The key matching the parameter tag name.
"value": "A String", # The value to be substituted.
},
],
"verticalAdsFormatSetting": { # Vertical ads setting feature to enable/disable ad group format controls in search campaigns. # Vertical ads setting feature to enable/disable ad group format controls in search campaigns. This setting requires AiMaxAdGroupSetting to be enabled and a travel feed to be attached to the campaign.
"disableTextAds": True or False, # If true, text ads will be disabled for this ad group.
"enableBookingLinks": True or False, # If true, booking links will be enabled for this ad group.
"enableVerticalPromotionAds": True or False, # If true, vertical promotion ads will be enabled for this ad group.
},
},
"updateMask": "A String", # FieldMask that determines which resource fields are modified in an update.
},
],
"partialFailure": True or False, # If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.
"responseContentType": "A String", # The response content type setting. Determines whether the mutable resource or just the resource name should be returned post mutation.
"validateOnly": True or False, # If true, the request is validated but not executed. Only errors are returned, not results.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for an ad group mutate.
"partialFailureError": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors), we return an RPC level error.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
"results": [ # All results for the mutate.
{ # The result for the ad group mutate.
"adGroup": { # An ad group. # The mutated ad group with only mutable fields after mutate. The field will only be returned when response_content_type is set to "MUTABLE_RESOURCE".
"adRotationMode": "A String", # The ad rotation mode of the ad group.
"aiMaxAdGroupSetting": { # Settings for AI Max feature in standard search adgroups. # Settings for AI Max feature in standard search adgroups.
"disableSearchTermMatching": True or False, # Disable search term matching for this adgroup when AI Max is enabled. Search term matching uses broad match, asset-based, and landing page-based technology to improve reach.
},
"audienceSetting": { # Settings for the audience targeting. # Immutable. Setting for audience related features.
"useAudienceGrouped": True or False, # Immutable. If true, this ad group uses an Audience resource for audience targeting. If false, this ad group may use audience segment criteria instead.
},
"baseAdGroup": "A String", # Output only. For draft or experiment ad groups, this field is the resource name of the base ad group from which this ad group was created. If a draft or experiment ad group does not have a base ad group, then this field is null. For base ad groups, this field equals the ad group resource name. This field is read-only.
"campaign": "A String", # Immutable. The campaign to which the ad group belongs.
"cpcBidMicros": "A String", # The maximum CPC (cost-per-click) bid. This field is used when the ad group's effective bidding strategy is Manual CPC. This field is not applicable and will be ignored if the ad group's campaign is using a portfolio bidding strategy.
"cpmBidMicros": "A String", # The maximum CPM (cost-per-thousand viewable impressions) bid.
"cpvBidMicros": "A String", # The CPV (cost-per-view) bid.
"creationTime": "A String", # Output only. The timestamp when this ad_group was created. The timestamp is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss" format.
"demandGenAdGroupSettings": { # Settings for Demand Gen ad groups. # Settings for Demand Gen ad groups.
"channelControls": { # Channel controls for Demand Gen ad groups. # Channel controls for Demand Gen ad groups.
"channelConfig": "A String", # Output only. Channel configuration reflecting which field in the oneof is populated.
"channelStrategy": "A String", # High level channel strategy.
"selectedChannels": { # Explicitly selected channels for channel controls in Demand Gen ad groups. # Explicitly selected channels. This field should be set with at least one true value when present.
"discover": True or False, # Whether to enable ads on the Discover channel.
"display": True or False, # Whether to enable ads on the Display channel.
"gmail": True or False, # Whether to enable ads on the Gmail channel.
"youtubeInFeed": True or False, # Whether to enable ads on the YouTube In-Feed channel.
"youtubeInStream": True or False, # Whether to enable ads on the YouTube In-Stream channel.
"youtubeShorts": True or False, # Whether to enable ads on the YouTube Shorts channel.
},
},
},
"displayCustomBidDimension": "A String", # Lets advertisers specify a targeting dimension on which to place absolute bids. This is only applicable for campaigns that target only the display network and not search.
"effectiveCpcBidMicros": "A String", # Output only. Value will be same as that of the CPC (cost-per-click) bid value when the bidding strategy is one of manual cpc, enhanced cpc, page one promoted or target outrank share, otherwise the value will be null.
"effectiveLabels": [ # Output only. The resource names of effective labels attached to this ad group. An effective label is a label inherited or directly assigned to this ad group.
"A String",
],
"effectiveTargetCpaMicros": "A String", # Output only. The effective target CPA (cost-per-acquisition). This field is read-only.
"effectiveTargetCpaSource": "A String", # Output only. Source of the effective target CPA. This field is read-only.
"effectiveTargetCpc": "A String", # Output only. The effective target CPC (cost-per-click). This field is read-only.
"effectiveTargetCpcSource": "A String", # Output only. Source of the effective target CPC. This field is read-only.
"effectiveTargetRoas": 3.14, # Output only. The effective target ROAS (return-on-ad-spend). This field is read-only.
"effectiveTargetRoasSource": "A String", # Output only. Source of the effective target ROAS. This field is read-only.
"endDate": "A String", # Output only. Date when the ad group ends serving ads. By default, the ad group ends on the ad group's end date. If this field is set, then the ad group ends at the end of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14
"engineId": "A String", # Output only. ID of the ad group in the external engine account. This field is for non-Google Ads account only, for example, Yahoo Japan, Microsoft, Baidu etc. For Google Ads entity, use "ad_group.id" instead.
"engineStatus": "A String", # Output only. The Engine Status for ad group.
"excludeDemographicExpansion": True or False, # When this value is true, demographics will be excluded from the types of targeting which are expanded when optimized_targeting_enabled is true. When optimized_targeting_enabled is false, this field is ignored. Default is false.
"excludedParentAssetFieldTypes": [ # The asset field types that should be excluded from this ad group. Asset links with these field types will not be inherited by this ad group from the upper levels.
"A String",
],
"excludedParentAssetSetTypes": [ # The asset set types that should be excluded from this ad group. Asset set links with these types will not be inherited by this ad group from the upper levels. Location group types (GMB_DYNAMIC_LOCATION_GROUP, CHAIN_DYNAMIC_LOCATION_GROUP, and STATIC_LOCATION_GROUP) are child types of LOCATION_SYNC. Therefore, if LOCATION_SYNC is set for this field, all location group asset sets are not allowed to be linked to this ad group, and all Location Extension (LE) and Affiliate Location Extensions (ALE) will not be served under this ad group. Only LOCATION_SYNC is currently supported.
"A String",
],
"finalUrlSuffix": "A String", # URL template for appending params to Final URL.
"fixedCpmMicros": "A String", # The fixed amount in micros that the advertiser pays for every thousand impressions of the ad.
"id": "A String", # Output only. The ID of the ad group.
"labels": [ # Output only. The resource names of labels attached to this ad group.
"A String",
],
"languageCode": "A String", # Output only. The language of the ads and keywords in an ad group. This field is only available for Microsoft Advertising accounts. More details: https://docs.microsoft.com/en-us/advertising/guides/ad-languages?view=bingads-13#adlanguage
"lastModifiedTime": "A String", # Output only. The datetime when this ad group was last modified. The datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
"name": "A String", # The name of the ad group. This field is required and should not be empty when creating new ad groups. It must contain fewer than 255 UTF-8 full-width characters. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.
"optimizedTargetingEnabled": True or False, # True if optimized targeting is enabled. Optimized Targeting is the replacement for Audience Expansion.
"percentCpcBidMicros": "A String", # The percent cpc bid amount, expressed as a fraction of the advertised price for some good or service. The valid range for the fraction is [0,1) and the value stored here is 1,000,000 * [fraction].
"primaryStatus": "A String", # Output only. Provides aggregated view into why an ad group is not serving or not serving optimally.
"primaryStatusReasons": [ # Output only. Provides reasons for why an ad group is not serving or not serving optimally.
"A String",
],
"resourceName": "A String", # Immutable. The resource name of the ad group. Ad group resource names have the form: `customers/{customer_id}/adGroups/{ad_group_id}`
"startDate": "A String", # Output only. Date when this ad group starts serving ads. By default, the ad group starts now or the ad group's start date, whichever is later. If this field is set, then the ad group starts at the beginning of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14
"status": "A String", # The status of the ad group.
"targetCpaMicros": "A String", # The target CPA (cost-per-acquisition). If the ad group's campaign bidding strategy is TargetCpa or MaximizeConversions (with its target_cpa field set), then this field overrides the target CPA specified in the campaign's bidding strategy. Otherwise, this value is ignored.
"targetCpcMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every ad click. Overrides the target CPC configured at the campaign level.
"targetCpmMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every thousand times the ad is shown.
"targetCpvMicros": "A String", # Average amount in micros that the advertiser is willing to pay for every ad view.
"targetRoas": 3.14, # The target ROAS (return-on-ad-spend) for this ad group. This field lets you override the target ROAS specified in the campaign's bidding strategy, but only if the campaign is using a standard (not portfolio) `TargetRoas` strategy or a standard `MaximizeConversionValue` strategy with its `target_roas` field set. If the campaign is using a portfolio bidding strategy, this field cannot be set and attempting to do so will result in an error. For any other bidding strategies, this value is ignored. To see the actual target ROAS being used by the ad group, considering potential overrides, query the `effective_target_roas` and `effective_target_roas_source` fields.
"targetingSetting": { # Settings for the targeting-related features, at the campaign and ad group levels. For more details about the targeting setting, visit https://support.google.com/google-ads/answer/7365594 # Setting for targeting related features.
"targetRestrictionOperations": [ # The list of operations changing the target restrictions. Adding a target restriction with a targeting dimension that already exists causes the existing target restriction to be replaced with the new value.
{ # Operation to be performed on a target restriction list in a mutate.
"operator": "A String", # Type of list operation to perform.
"value": { # The list of per-targeting-dimension targeting settings. # The target restriction being added to or removed from the list.
"bidOnly": True or False, # Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.
"targetingDimension": "A String", # The targeting dimension that these settings apply to.
},
},
],
"targetRestrictions": [ # The per-targeting-dimension setting to restrict the reach of your campaign or ad group.
{ # The list of per-targeting-dimension targeting settings.
"bidOnly": True or False, # Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.
"targetingDimension": "A String", # The targeting dimension that these settings apply to.
},
],
},
"trackingUrlTemplate": "A String", # The URL template for constructing a tracking URL.
"type": "A String", # Immutable. The type of the ad group.
"urlCustomParameters": [ # The list of mappings used to substitute custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
{ # A mapping that can be used by custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
"key": "A String", # The key matching the parameter tag name.
"value": "A String", # The value to be substituted.
},
],
"verticalAdsFormatSetting": { # Vertical ads setting feature to enable/disable ad group format controls in search campaigns. # Vertical ads setting feature to enable/disable ad group format controls in search campaigns. This setting requires AiMaxAdGroupSetting to be enabled and a travel feed to be attached to the campaign.
"disableTextAds": True or False, # If true, text ads will be disabled for this ad group.
"enableBookingLinks": True or False, # If true, booking links will be enabled for this ad group.
"enableVerticalPromotionAds": True or False, # If true, vertical promotion ads will be enabled for this ad group.
},
},
"resourceName": "A String", # Returned for successful operations.
},
],
}