Audience rules set

78 views
Skip to first unread message

denma test

unread,
Aug 20, 2020, 9:08:42 AM8/20/20
to AdWords API and Google Ads API Forum
Hi
I have created audience with help of example provided and attached the same file too here. My concern is have created StringRuleItem with StringKey as "ecomm_pagetype and cartsize", but i cannot see these options in Google Ads UI, also how can i set type like event, URL, Page URL in APIand Referral URL, attached screen shot to refer. Am using Google Adwords API v201809. Thanks in advance.

denma test

unread,
Aug 20, 2020, 9:11:26 AM8/20/20
to AdWords API and Google Ads API Forum
missed attachments, added here
Screenshot_2020-08-20 denma client - Google Ads(1).png
Screenshot_2020-08-20 denma client - Google Ads.png

Google Ads API Forum Advisor Prod

unread,
Aug 20, 2020, 3:54:06 PM8/20/20
to denm...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to us. Have you seen this documentation on remarketing and user lists, which includes an example on creating a userlist using url visits? As for your question on StringRuleItem, could you further elaborate on this? What Customer ID are you experiencing issues with this? Is it related to your userlist that you're creating? For privacy, you can respond using "respond privately to user".

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5004Q23tK9U:ref

denma test

unread,
Aug 21, 2020, 4:18:56 AM8/21/20
to AdWords API and Google Ads API Forum
Hi Bryan
Thanks for the details, have created rule based audience list with Visitors of a page list member type, there i can use built-in remarketing parameters url__, ref_url__ as new StringKey("url__") or new StringKey("ref_url__"), may i know how to setup in-built type event. Checked with document but could not found. Thanks in advance.

Google Ads API Forum Advisor Prod

unread,
Aug 21, 2020, 12:53:38 PM8/21/20
to denm...@gmail.com, adwor...@googlegroups.com
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,

Google Logo
Bryan Li
Google Ads API Team
 


ref:_00D1U1174p._5004Q23tK9U:ref

denma test

unread,
Aug 24, 2020, 8:25:06 AM8/24/20
to AdWords API and Google Ads API Forum
Hello
Actually i have done rule based audience list for webiste visitor, but my query is what the built-in remarketing parameter for Event as like StringKey urlKey = new StringKey("url__"); You can see there are three options available while creating audience list. Ataached screenshots with 3 options.
visitor_of_page.png

Google Ads API Forum Advisor Prod

unread,
Aug 24, 2020, 3:08:25 PM8/24/20
to denm...@gmail.com, adwor...@googlegroups.com

Hi,

I took a closer look at this and it looks like your event is a custom type parameter in rule based audience lists. You can follow here to see how to set this type of custom parameter as a rule for your audience. Let me know if you have further questions.

Thank you,

denma test

unread,
Aug 25, 2020, 12:39:38 AM8/25/20
to AdWords API and Google Ads API Forum
Hi
I have studied about custom parameters also implemented, jut looking for built-in option for Event type as in Googls Ads UI. So finally there are Page URL, Referrer URL options can be done with built-in params and Event can be done via Custom parameter since there is no built-in option for this. Am i right.

Google Ads API Forum Advisor Prod

unread,
Aug 25, 2020, 1:01:19 PM8/25/20
to denm...@gmail.com, adwor...@googlegroups.com
Hi,

Yes that is correct. Let me know if you have further questions.

denma test

unread,
Aug 26, 2020, 1:37:31 AM8/26/20
to AdWords API and Google Ads API Forum
Okay, fine. Let me work as discussed will come back if any queries. Thanks.
Reply all
Reply to author
Forward
0 new messages