Hi,
Thank you for contacting the Ad Manager API support team.
I would like to inform you that the"population method" option is only available in the Ad Manager UI. I will raise a request to add this feature in the Ad Manager API. With that being said, I am unable to comment about the availability of this feature in the API. I'd advise you to follow our Blog Post and Release Notes for announcements about new API releases and features.
Although there is no field that directly corresponds to the UI's Population Method, you can create "Publisher Managed" segments by creating a NonRuleBasedFirstPartyAudienceSegment . Similarly, you can create a Traffic based segment by creating a RuleBasedFirstPartyAudienceSegment . For pixel tracking, you can set the Targeting of the RuleBasedFirstPartyAudienceSegment to target the audience pixel ad unit and manually create custom criteria.
![]() |
Ad Manager API Team |
[2025-04-01 14:43:55Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vHEOk:ref" (ADR-00297920)
Thank you for your previous response and for the clarification regarding the audience segment population method and the use of RuleBasedFirstPartyAudienceSegment
for traffic-based segmentation.
I am currently trying to implement a pixel-based audience segment using the Ad Manager API, but I have not been able to successfully create one despite several attempts. I understand from your documentation and support response that this involves creating a RuleBasedFirstPartyAudienceSegment
and setting the rules to match the audience pixel ad unit.
Could you please provide a working example (preferably in Python, Php or Java) showing how to create a pixel-based audience segment via the API? If available, a link to an example in your GitHub repository or other relevant documentation would be very helpful.
Specifically, I am looking for:
A full example of how to create a RuleBasedFirstPartyAudienceSegment
How to configure the targeting rules using ad unit criteria
How to simulate the behavior of a pixel-based population method via the API
I have reviewed the API reference and blog posts, but I have not found a complete working example. Any assistance or guidance would be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "Google Ad Manager API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-doubleclick-for-p...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-doubleclick-for-publishers-api/CYkgo000000000000000000000000000000000000000000000SU1NL700xV8Kd6rXTAWR38oIhQenuw%40sfdc.net.
Hi,
Thank you for reaching out to the Ad Manager API support team.
A pixel based segment is an instance of a RuleBasedFirstPartyAudienceSegment with a particular rule configuration:
The easiest way to do this is to use an existing pixel based segment as a template. Here are the steps:
To create RuleBasedFirstPartyAudienceSegment, I recommend using the createAudienceSegments() in the AudienceSegmentService. Here is the sample code for creating a RuleBasedFirstPartyAudienceSegment in java. You may refer to all available client libraries for the Ad Manager API.
![]() |
Ad Manager API Team |
[2025-07-08 07:47:29Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vHEOk:ref" (ADR-00297920)
Hello Support Team,
I hope you're doing well.
I’m currently working on creating a pixel-based audience segment using the Ad Manager API by implementing a RuleBasedFirstPartyAudienceSegment
. I'm including AdUnit-level targeting and setting the required parameters such as pageViews
, recencyDays
, and membershipExpirationDays
.
Attached below is a minimal reproducible PHP example demonstrating how I’m setting this up via the API.
My goal is to have the “Generate Tag” option available in the UI under Inventory > Audience segments, but unfortunately, the “Generate Tag” button does not appear after the segment is created—even when the type is confirmed to be RULE_BASED
.
Could you please confirm the following?
Is this implementation pattern correct to trigger a pixel-based segment creation?
What are the exact conditions or steps required for the “Generate Tag” button to appear in the Google Ad Manager UI for a RuleBasedFirstPartyAudienceSegment
?
Is there any delay or post-creation processing time before this feature becomes available?
Any guidance or official documentation on this would be highly appreciated. I’ve been testing with various rule combinations, but haven’t been able to activate the tag generation option yet.