Adding remarketing to adgroup api

85 views
Skip to first unread message

develop...@gmail.com

unread,
Dec 6, 2017, 4:28:28 AM12/6/17
to AdWords API Forum
Hi,
    I have created remarkrting list using addaudience then will add that list to campaign or adgroup.i dont know which api file have include for this operation.

For example:
I have created "Daves" remaketing list  now am creating campaign name with "testcampaign"..i want add "Daves" to "testcampaign" In API from my package

Thanks.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Dec 6, 2017, 12:13:17 PM12/6/17
to AdWords API Forum
Hi, 

You can use the CampaignCriterionService and add the CriterionUserList to the "testcampaign" Campaign. This section of the re-marketing and audience targeting guide shows how to do that. If you need a sample for adding a campaign targeting criteria, you could check AddCampaignTargetingCriteria sample in PHP. Let me know if you face any issues while trying this out. 

Thanks,
Sreelakshmi, AdWords API Team

develop...@gmail.com

unread,
Dec 6, 2017, 11:36:59 PM12/6/17
to AdWords API Forum
Hi,
    I have added adgroupcriterionservice and criterionuserlist in my adgroup for link a remarketing list to that adgroup.But the list have not added for that adgroup in adwords platform.

Have i did anything wrong in ths?

    $criterionUserList = new CriterionUserList();
    $criterionUserList->userListId = $userListId;
    $criterionUserList->type = "USER_LIST";

    $adGroupCriterion = new BiddableAdGroupCriterion();
    $adGroupCriterion->adGroupId = $adGroupId;
    $adGroupCriterion->criterion = $criterionUserList;
    $adGroupCriteria[] = $adGroupCriterion;
    // Create operation.

    $operation = new AdGroupCriterionOperation();
    $operation->operand = $adGroupCriterion;
    $operation->operator = 'ADD';

    $operations[] = $operation;
    $result = $adGroupCriterionService->mutate($operations);

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Dec 7, 2017, 12:12:23 PM12/7/17
to AdWords API Forum
Hi, 

Could you try with the code snippet given below?
 
    $operations = [];
    $criterionUserList
= new CriterionUserList();
    $criterionUserList
->setUserListId($userlistId);

    $adGroupCriterion
= new BiddableAdGroupCriterion();
    $adGroupCriterion
->setAdGroupId($adGroupId);
    $adGroupCriterion
->setCriterion($criterionUserList);


   
// Create operation.
    $operation
= new AdGroupCriterionOperation();

    $operation
->setOperand($adGroupCriterion);
    $operation
->setOperator(Operator::ADD);


    $operations
[] = $operation;
    $result
= $adGroupCriterionService->mutate($operations);


If you are still not able to find the criterion on the AdGroup, please enable logging and share the complete SOAP logs.
Message has been deleted
Message has been deleted

develop...@gmail.com

unread,
Dec 8, 2017, 3:49:25 AM12/8/17
to AdWords API Forum
Hi,
    I have linked the remarketing list to my adgroup which was created by test account.Thanks for your immediate respose to get rid off my problem.

I am having a doubt of creating addaudience through this API  addaudiebce but adding audience to the lsit will be always VISITORS OF A PAGE WITH A TAG alone.If i want to create a list with Visitors of a page who also visited another page etc which field i have to change in Addaudience API file.


Thanks,
Priya K.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Dec 8, 2017, 12:49:16 PM12/8/17
to AdWords API Forum
Hi Priya, 

Since your original issue of setting user list as an AdGroupTargetingCriterion is resolved now, could you please create a new thread for your most recent question? This helps us to keep track of different issues and will be easy for anyone who is searching for similar issues on the forum. 
Reply all
Reply to author
Forward
0 new messages