Hi,
I took a look at the documentation I've linked and it shows a coding snippet for setting a rule based audience list for visitors to a website. The example is as below:
// Get the user list service.
AdwordsUserListServiceInterface userListService =
adWordsServices.get(session, AdwordsUserListServiceInterface.class);
// Use built-in parameter to create domain URL rule.
StringKey urlKey = new StringKey("url__");
StringRuleItem urlStringRuleItem = new StringRuleItem();
urlStringRuleItem.setKey(urlKey);
urlStringRuleItem.setOp(StringRuleItemStringOperator.CONTAINS);
urlStringRuleItem.setValue("example.com");
RuleItem urlRuleItem = new RuleItem();
urlRuleItem.setStringRuleItem(urlStringRuleItem);
RuleItemGroup ruleItemGroup = new RuleItemGroup();
ruleItemGroup.setItems(new RuleItem[] {urlRuleItem});
Rule rule = new Rule();
rule.setGroups(new RuleItemGroup[] {ruleItemGroup});
// Create the user list.
ExpressionRuleUserList expressionUserList = new ExpressionRuleUserList();
expressionUserList.setName("All visitors to example.com");
expressionUserList.setDescription("Any visitor to any page of example.com");
expressionUserList.setRule(rule);
expressionUserList.setMembershipLifeSpan(365L);
expressionUserList.setStatus(UserListMembershipStatus.OPEN);
// Optional: To include past users in the user list, set the
// prepopulationStatus to REQUESTED.
expressionUserList.setPrepopulationStatus(
RuleBasedUserListPrepopulationStatus.REQUESTED);
// Create and submit the operation.
UserListOperation operation = new UserListOperation();
operation.setOperator(Operator.ADD);
operation.setOperand(expressionUserList);
UserListReturnValue result =
userListService.mutate(new UserListOperation[] {operation});
Long userListId = result.getValue(0).getId();
Is "visiting your website" the event trigger you're mentioning? Or are you looking for another event trigger?
Thank you,
 |
| Bryan Li |
| Google Ads API Team |
|
|
| |

ref:_00D1U1174p._5004Q23tK9U:ref