Hi Devraj,

That looks correct to me - it matches the example I have exactly.

Cheers,
Josh, AdWords API Team

On Thursday, January 15, 2015 at 6:29:10 PM UTC-5, Dev Gupta wrote:
>
> Hi Josh,
>
> Thanks for the details. I think i understand it now. So please confirm 
> what i am doing below is correct
>
> 1. From AddRuleBasedUserList i do the below
>
>     StringKey pageTypeKey = new StringKey("url__");
>     
>     StringRuleItem checkoutStringRuleItem = new StringRuleItem();
>     checkoutStringRuleItem.setKey(pageTypeKey);
>     checkoutStringRuleItem.setOp(StringRuleItemStringOperator.CONTAINS);
>     checkoutStringRuleItem.setValue("
> http://www.XXX.com/product-list/hiking/backpacks/";);
>
>     RuleItem checkoutRuleItem = new RuleItem();
>     checkoutRuleItem.setStringRuleItem(checkoutStringRuleItem);
>
> Add this to the UserList and then Use it in AddAudience.java. If i have 
> flawed anywhere please let me know.
>
> Thanks,
> -Devraj
>
> On Wednesday, January 14, 2015 at 10:30:51 AM UTC-8, Josh Radcliff 
> (AdWords API Team) wrote:
>>
>> Hi Devraj,
>>
>> The "URL contains X" lists are represented as RuleBasedUserList 
>> <https://developers.google.com/adwords/api/docs/reference/v201409/AdwordsUserListService.RuleBasedUserList>
>>  objects 
>> in the API. As mentioned in the StringKey docs 
>> <https://developers.google.com/adwords/api/docs/reference/v201409/AdwordsUserListService.StringKey>,
>>  
>> there's a predefined key for URL (url__). Below is some sample XML that 
>> creates a rule-based user list that looks for visitors to URLs that contain 
>> "cats" OR "dogs".
>>
>>         <mutate xmlns="https://adwords.google.com/api/adwords/rm/v201409
>> ">
>>             <operations>
>>                 <ns7:operator xmlns:ns7="
>> https://adwords.google.com/api/adwords/cm/v201409";>ADD</ns7:operator>
>>                 <operand xmlns:ns8="
>> https://adwords.google.com/api/adwords/rm/v201409"; 
>> xsi:type="ns8:ExpressionRuleUserList">
>>                     <name>URL rules for cats and dogs</name>
>>                     <description>URL based rules</description>
>>                     <rule>
>>                         <groups>
>>                             <items>
>>                                 <StringRuleItem>
>>                                     <key>
>>                                         <name>url__</name>
>>                                     </key>
>>                                     <op>CONTAINS</op>
>>                                     <value>*cats*</value>
>>                                 </StringRuleItem>
>>                             </items>
>>                         </groups>
>>                         <groups>
>>                             <items>
>>                                 <StringRuleItem>
>>                                     <key>
>>                                         <name>url__</name>
>>                                     </key>
>>                                     <op>CONTAINS</op>
>>                                     <value>*dogs*</value>
>>                                 </StringRuleItem>
>>                             </items>
>>                         </groups>
>>                     </rule>
>>                 </operand>
>>             </operations>
>>         </mutate>
>>
>> You can read up on how to create these lists in the Rule-based 
>> Remarketing guide 
>> <https://developers.google.com/adwords/api/docs/guides/rule-based-remarketing>
>> .
>>
>> Cheers,
>> Josh, AdWords API Team
>>
>> On Tuesday, January 13, 2015 at 8:17:01 PM UTC-5, Dev Gupta wrote:
>>>
>>> Josh,
>>>
>>> Just adding a bit more to this.
>>>
>>> I was able to set this up though the UI but the API path is still not 
>>> clear to me. While setting this up in UI i was specifically asked which 
>>> URL's from my website i wanted to include (i did not wanted to track all 
>>> webpages); however, in the API route i do not see where i can enter the URL 
>>> and how i can track just the user of a particular URL.
>>>
>>> Any insights/better documentation?
>>>
>>> Thanks,
>>> -Devraj
>>>
>>> On Thursday, November 6, 2014 at 1:07:48 PM UTC-8, Josh Radcliff 
>>> (AdWords API Team) wrote:
>>>>
>>>> Hi Devraj,
>>>>
>>>> In response to your questions:
>>>>
>>>> 1. No, you can have different user lists that track users for different 
>>>> ConversionTracker 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201409/ConversionTrackerService.ConversionTracker>
>>>> s.
>>>> 2. Since they don't have to all have the same ID you shouldn't hard 
>>>> code it. You'll want to get the IDs for each ConversionTracker 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201409/ConversionTrackerService.ConversionTracker>
>>>>  whose 
>>>> users you want to include in your UserList and use those when constructing 
>>>> the UserList's conversionTypes 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201409/AdwordsUserListService.BasicUserList#conversionTypes>
>>>>  collection.
>>>>
>>>> Cheers,
>>>> Josh, AdWords API Team
>>>>
>>>> On Wednesday, November 5, 2014 6:06:32 PM UTC-5, Dev Gupta wrote:
>>>>>
>>>>> Hi Josh,
>>>>>
>>>>> Appreciate your quick response; i did go through the Guide but few 
>>>>> things are still not clear to me
>>>>>
>>>>> 1. Do all UserList have the same trackers'ID or different?
>>>>> 2. If they do have the same ID which i assume is the one i got from 
>>>>> the Adwords code to be put in each page; can i hardcode it as 
>>>>>
>>>>> UserListConversionType conversionType = new UserListConversionType();
>>>>>    conversionType.setName("Mars cruise customers #" + 
>>>>> System.currentTimeMillis());
>>>>>    conversionType.setId("99251XXXXX"); //Added
>>>>>
>>>>> Thanks,
>>>>> -Devraj
>>>>>
>>>>> On Wednesday, November 5, 2014 2:10:38 PM UTC-8, Josh Radcliff 
>>>>> (AdWords API Team) wrote:
>>>>>>
>>>>>> Hi Devraj,
>>>>>>
>>>>>> Is your question whether you can use an existing conversion to set up 
>>>>>> a UserList? If so, the answer is yes. From our Remarketing guide 
>>>>>> <https://developers.google.com/adwords/api/docs/guides/remarketing#user-list-conversion-trackers>
>>>>>> :
>>>>>>
>>>>>> Notice a UserListConversionType 
>>>>>>> <https://developers.google.com/adwords/api/docs/reference/latest/AdwordsUserListService.UserListConversionType>
>>>>>>>  is 
>>>>>>> attached to the list. This triggers the generation of a conversion 
>>>>>>> tracker 
>>>>>>> (i.e. conversion pixel) which is simply a piece of HTML with JavaScript 
>>>>>>> code you place on your website. Whenever a visitor accesses a page 
>>>>>>> containing this snippet of code, he will be added to your list. If 
>>>>>>> you have already set up conversion tracking, you can reuse your 
>>>>>>> existing 
>>>>>>> trackers by providing the tracker's ID when creating the list.
>>>>>>
>>>>>>
>>>>>> AdWords assigns IDs to objects automatically when you create them -- 
>>>>>> you don't need to set those yourself. However, when setting up your 
>>>>>> UserList you *will* need to provide the ID of the conversion tracker 
>>>>>> you want to use for the list. To get the ID of your conversion tracker 
>>>>>> you 
>>>>>> can use a ConversionTrackerService.get 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201409/ConversionTrackerService#get>
>>>>>>  call 
>>>>>> and pull the id 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201409/ConversionTrackerService.ConversionTracker#id>
>>>>>>  from 
>>>>>> the returned ConversionTracker object.
>>>>>>
>>>>>> If that doesn't cover your questions, please provide more details and 
>>>>>> we'll proceed from there.
>>>>>>
>>>>>> Thanks,
>>>>>> Josh, AdWords API Team
>>>>>>
>>>>>> On Wednesday, November 5, 2014 2:21:59 PM UTC-5, Dev Gupta wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am trying to use the Remarketing feature for the first time. I 
>>>>>>> have got the Remarketing code from Adwords and placed it on the website.
>>>>>>>
>>>>>>> Looking through the examples; i have garnered the below flow.
>>>>>>>
>>>>>>> With #2 i can associate one of my Userlist with a predefined Adgroup 
>>>>>>> to be shown during Remarketing. My question is how do i link the 
>>>>>>> tracker ID 
>>>>>>> that i have received (looks like var google_conversion_id = 9925XXXXX) 
>>>>>>> with 
>>>>>>> the code below? where is this linking done? UserListConversionTypes and 
>>>>>>> BasicUserList both have ID's; am i supposed to set any of those or this 
>>>>>>> is 
>>>>>>> done automatically?
>>>>>>>
>>>>>>> Any pointers/help will be appreciated. 
>>>>>>>
>>>>>>> Please also let me know if you fine any issue with the code below.
>>>>>>>
>>>>>>> set up remarketing using the AdWords API in two steps:
>>>>>>>
>>>>>>>  Create a remarketing list.
>>>>>>>  Create a CriterionUserList to tie your list to an AdGroup.
>>>>>>>
>>>>>>> 1.Create a remarketing list
>>>>>>>
>>>>>>> Creating a remarketing list involves the creation of two separate 
>>>>>>> entities: the RemarketingList itself and its associated 
>>>>>>> UserListConversionTypes also known as remarketing tags. 
>>>>>>>
>>>>>>> The following code shows how to create a remarketing list.
>>>>>>>
>>>>>>>
>>>>>>>    AdWordsServices adWordsServices, AdWordsSession session) throws 
>>>>>>> Exception {
>>>>>>>     // Get the UserListService.
>>>>>>>     AdwordsUserListServiceInterface userListService =
>>>>>>>         adWordsServices.get(session, 
>>>>>>> AdwordsUserListServiceInterface.class);
>>>>>>>
>>>>>>>     // Get the ConversionTrackerService.
>>>>>>>     ConversionTrackerServiceInterface conversionTrackerService =
>>>>>>>         adWordsServices.get(session, 
>>>>>>> ConversionTrackerServiceInterface.class);
>>>>>>>
>>>>>>>     UserListConversionType conversionType = new 
>>>>>>> UserListConversionType();
>>>>>>>     conversionType.setName("Mars cruise customers #" + 
>>>>>>> System.currentTimeMillis());
>>>>>>>
>>>>>>> // Create remarketing user list.
>>>>>>> RemarketingUserList userList = new RemarketingUserList();
>>>>>>> userList.setName("Mars cruise customers #" + 
>>>>>>> System.currentTimeMillis());
>>>>>>> userList.setDescription("A list of mars cruise customers in the last 
>>>>>>> year");
>>>>>>> userList.setMembershipLifeSpan(365L);
>>>>>>> userList.setConversionTypes(new UserListConversionType[] 
>>>>>>> {conversionType});
>>>>>>>
>>>>>>> // Create operations.
>>>>>>> UserListOperation operation = new UserListOperation();
>>>>>>> operation.setOperand(userList);
>>>>>>> operation.setOperator(Operator.ADD);
>>>>>>>
>>>>>>> UserListOperation[] operations = new UserListOperation[] {operation};
>>>>>>>
>>>>>>> // Add user list.
>>>>>>> userList = userListService.mutate(operations).getValue()[0];
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2.Tie a remarketing list to an AdGroup
>>>>>>>
>>>>>>>
>>>>>>> A new type of criteria object called CriterionUserList is now part 
>>>>>>> of v201008. Through this type of criteria you are able to tie a 
>>>>>>> UserList to 
>>>>>>> an AdGroup. As with other types of 
>>>>>>>
>>>>>>> criteria, this type is also managed through the 
>>>>>>> AdGroupCriterionService. The following code shows you how to create a 
>>>>>>> CriterionUserList and tie it to an existing AdGroup.
>>>>>>>
>>>>>>>
>>>>>>> // Create user list criterion.
>>>>>>> CriterionUserList userListCriterion = new CriterionUserList();
>>>>>>> userListCriterion.setUserListId(userListId);
>>>>>>>
>>>>>>> // Create biddable ad group criterion.
>>>>>>> BiddableAdGroupCriterion biddableCriterion = new 
>>>>>>> BiddableAdGroupCriterion();
>>>>>>> biddableCriterion.setAdGroupId(adGroupId);
>>>>>>> biddableCriterion.setCriterion(userListCriterion);
>>>>>>>
>>>>>>> // Create operation.
>>>>>>> AdGroupCriterionOperation operation = new 
>>>>>>> AdGroupCriterionOperation();
>>>>>>> operation.setOperand(biddableCriterion);
>>>>>>> operation.setOperator(Operator.ADD);
>>>>>>>
>>>>>>> AdGroupCriterionOperation[] operations = new 
>>>>>>> AdGroupCriterionOperation[] {operation};
>>>>>>>
>>>>>>> // Add keywords.
>>>>>>> AdGroupCriterionReturnValue result = 
>>>>>>> adGroupCriterionService.mutate(operations);
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> -Devraj
>>>>>>>
>>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2232ca4f-d781-4b27-a0fc-6b8a391b1abd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to