Context: Using Ruby on Rails with google-ads-googleads gem (v.12.0.1)
Trying to add a combined audience segment to a standard display campaign - which works just fine via the google ads manager, but when trying to do it programmatically, I bump into the following error:
The human readable version: ERROR IN CREATING GOOGLE CAMPAIGN: operations[0] > create[0] > combined_audience[0] with value: DISPLAY(DISPLAY_STANDARD) because the operation is not allowed for the given context.
The full error object:
<Google::Ads::GoogleAds::V8::Errors::GoogleAdsError: error_code: <Google::Ads::GoogleAds::V8::Errors::ErrorCode: context_error: :OPERATION_NOT_PERMITTED_FOR_CONTEXT>, message: "The operation is not allowed for the given context.", trigger: <Google::Ads::GoogleAds::V8::Common::Value: string_value: "DISPLAY(DISPLAY_STANDARD)">, location: <Google::Ads::GoogleAds::V8::Errors::ErrorLocation: field_path_elements: [<Google::Ads::GoogleAds::V8::Errors::ErrorLocation::FieldPathElement: field_name: "operations", index: 0>, <Google::Ads::GoogleAds::V8::Errors::ErrorLocation::FieldPathElement: field_name: "create">, <Google::Ads::GoogleAds::V8::Errors::ErrorLocation::FieldPathElement: field_name: "combined_audience">]>>
For more context, the code used to add the campaign criterion:
audience = client.operation.create_resource.campaign_criterion do |criterion|
criterion.campaign = client.path.campaign(customer_id, campaign_id)
criterion.combined_audience = client.resource.combined_audience_info do |audience|
audience.combined_audience = audience_resource_name
end
end
response = criteria_service.mutate_campaign_criteria(
customer_id: customer_id,
operations: operations,
partial_failure: true
)
Thanks in advance for any help here