Hello Phu,
I have good news! One of our user list experts found a way to do what you want. I'll explain with both a bit of ASCII art and SOAP XML. In this example, we're saying you want people who visited
example.com/yes, but not
example.com/no.
LogicalUserList
l l
l l
UserListLogicalRule UserListLogicalRule
(operator: ALL) Operator: NONE | | | | ExpressionRuleUserList ExpressionRuleUserList Rule: url__ CONTAINS example.com/yes Rule: url__ CONTAINS example.com/no
You'll want a LogicalUserList. In the LogicalUserList, you need one UserListLogicalRule to have an operator ALL and the other UserListLogicalRule to have an operator NONE. In the ALL UserListLogicalRule, you need to create an ExpressionRuleUserList with all the URLs that you want the user to visit. In the NONE UserListLogicalRule, you want an ExpressionRuleUserList with all the URLs that should NOT have been visited. The key to both these ExpressionRuleUserList rules will be url__ and the operator will be CONTAINS.
This is going to be a two-step process because the ExpressionRuleUserLists have to exist before the adding the LogicalUserList.
Step 1: Create the ExpressionRuleUserLists. Here's the SOAP XML request for that.
Step 2: Create the LogicalUserList with the two ExpressionUserLists that you created earlier. Here's the request:
<mutate xmlns="https://adwords.google.com/api/adwords/rm/v201601"><operations><operator xmlns="https://adwords.google.com/api/adwords/cm/v201601">ADD</operator><operand xsi:type="LogicalUserList" ><name>Visited one site, but not another site.</name><description>Visitors to one site, but not another site.</description><rules><operator>ALL</operator><ruleOperands><UserList xsi:type="ExpressionRuleUserList" ><id>101794822</id><rule><groups><items><StringRuleItem><key><name>url__</name></key><op>CONTAINS</op><value>http://example.com/yes</value></StringRuleItem></items></groups></rule></UserList></ruleOperands></rules><rules><operator>NONE</operator><ruleOperands><UserList xsi:type="ExpressionRuleUserList" ><id>101794942</id><rule><groups><items><StringRuleItem><key><name>url__</name></key><op>CONTAINS</op><value>http://example.com/no</value></StringRuleItem></items></groups></rule></UserList></ruleOperands></rules></operand></operations></mutate> And here's the response. Note that the response has the entire tree of lists in it:
<ns2:mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201601" xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201601"><ns2:rval><ListReturnValue.Type>UserListReturnValue</ListReturnValue.Type><ns2:value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:LogicalUserList"><ns2:id>101795182</ns2:id><ns2:isReadOnly>false</ns2:isReadOnly><ns2:name>Visited one site, but not another site.</ns2:name><ns2:description>Visitors to one site, but not another site.</ns2:description><ns2:status>OPEN</ns2:status><ns2:integrationCode></ns2:integrationCode><ns2:accessReason>OWNED</ns2:accessReason><ns2:accountUserListStatus>ACTIVE</ns2:accountUserListStatus><ns2:membershipLifeSpan>30</ns2:membershipLifeSpan><ns2:listType>LOGICAL</ns2:listType><ns2:isEligibleForSearch>true</ns2:isEligibleForSearch><ns2:UserList.Type>LogicalUserList</ns2:UserList.Type><ns2:rules><ns2:operator>ALL</ns2:operator><ns2:ruleOperands><ns2:UserList xsi:type="ns2:ExpressionRuleUserList"><ns2:id>101794822</ns2:id><ns2:isReadOnly>true</ns2:isReadOnly><ns2:name>Visited</ns2:name><ns2:listType>RULE_BASED</ns2:listType><ns2:UserList.Type>ExpressionRuleUserList</ns2:UserList.Type><ns2:rule><ns2:groups><ns2:items><ns2:StringRuleItem><ns2:key><ns2:name>url__</ns2:name></ns2:key><ns2:op>CONTAINS</ns2:op><ns2:value>http://example.com/yes</ns2:value></ns2:StringRuleItem></ns2:items></ns2:groups></ns2:rule></ns2:UserList></ns2:ruleOperands><ns2:ruleOperands><ns2:UserList xsi:type="ns2:ExpressionRuleUserList"><ns2:id>101794942</ns2:id><ns2:isReadOnly>true</ns2:isReadOnly><ns2:name>Not visited</ns2:name><ns2:listType>RULE_BASED</ns2:listType><ns2:UserList.Type>ExpressionRuleUserList</ns2:UserList.Type><ns2:rule><ns2:groups><ns2:items><ns2:StringRuleItem><ns2:key><ns2:name>url__</ns2:name></ns2:key><ns2:op>NOT_CONTAIN</ns2:op><ns2:value>http://example.com/no</ns2:value></ns2:StringRuleItem></ns2:items></ns2:groups></ns2:rule></ns2:UserList></ns2:ruleOperands></ns2:rules></ns2:value></ns2:rval></ns2:mutateResponse>
In the user interface, it will look like a combination of user lists, but it will have the same behavior that you need.
Cheers,
Nadine, AdWords API Team