PMax Audience with mix of User Interests & Detailed Demographics

42 views
Skip to first unread message

Danil Antonov

unread,
Jul 1, 2025, 9:10:16 AM7/1/25
to Google Ads API and AdWords API Forum

Hello!


I'm trying to create a PMax campaign with Asset Group Signals.

I've found how we can build Audience Signals for User Interests:

  1. Retrieve User Interests via API

  2. Use the resource name of the User Interest to create an Audience with dimension like:

audience_proto = google_ads_client.init_resource( Audience, resource_name=google_ads_client.google_ads_service.audience_path( self.customer_id, mutate_session.next_temp_id() ), scope=AudienceScopeEnum.AudienceScope.ASSET_GROUP, asset_group=asset_group_resource, ) audience_dimension=google_ads_client.init_resource( AudienceDimension, ) audience_dimension_user_interests.audience_segments.segments = [ {"user_interest": {"user_interest_category": "customers/5244804050/userInterests/92901"}}, # shoppers {"user_interest": {"user_interest_category": "customers/5244804050/userInterests/80001"}}, # Autos & Vehicles ] audience_proto.dimensions.append(audience_dimension_user_interests)


Then, we can use this Audience with the needed Asset Group via the Asset Group Signal, and it seems it works with User Interests.

But when I try to add detailed demographics to the dimension when creating an Audience:

audience_dimension_user_interests=google_ads_client.init_resource( AudienceDimension, ) audience_dimension_user_interests.audience_segments.segments = [ {"user_interest": {"user_interest_category": "customers/5244804050/userInterests/92901"}}, # shoppers {"user_interest": {"user_interest_category": "customers/5244804050/userInterests/80001"}}, # Autos & Vehicles {"detailed_demographic": {"detailed_demographic": "customers/5244804050/detailedDemographics/30015"}}, # Homeownership Status ] audience_proto.dimensions.append(audience_dimension_user_interests)

I receive such an error:

“Message: A dimension within the audience definition is not valid. || Location: mutate_operations [41] -> audience_operation [0] -> create [0] -> dimensions [0] -> audience_segments [0] -> segments [2] -> detailed_demographic [0] -> detailed_demographic [0]”



I’ve tried to create 2 dimensions - one for User Interests and one for Detailed Demographics and use them both within one Audience, but in this case, I received an error:

“Message: Audience can't have multiple dimensions of same type. || Location: mutate_operations [41] -> audience_operation [0] -> create [0] -> dimensions [1]”



Then, I’ve tried to create an Audience with the Detailed Demographics only (without User Interests) and received the same error as with mix of Detailed Demographics and User Interests:

Message: A dimension within the audience definition is not valid. || Location: mutate_operations [41] -> audience_operation [0] -> create [0] -> dimensions [0] -> audience_segments [0] -> segments [0] -> detailed_demographic [0] -> detailed_demographic [0]

Could you please suggest how we can create an Audience with Detailed Demographics specified so we can use this Audience with our PMax Asset Group Signal?

Google Ads API Forum Advisor

unread,
Jul 1, 2025, 1:58:06 PM7/1/25
to antonovd...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

I understand that you are encountering errors while trying to create an Audience via the Google Ads API. Create and update an audience using the AudienceService. Each Audience must have a unique name. Audiences are made up of audience segments and other audience dimensions, including age, gender, household income, and parental status. A segment can be only one of the following:
  • User list segments
  • Affinity or in-market segments
  • Life event segments
  • Detailed demographic segments
  • Custom audience segments
Also, refer to this guide for information on how to create PMax campaign with Asset Group Signals.

With regard to the 'DIMENSION_INVALID​​'​​​​​ error you are encountering, please provide us with the "complete API logs" (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-07-01 17:57:25Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rgpQt:ref" (ADR-00316643)



Reply all
Reply to author
Forward
0 new messages