Thursday, 22 September 2016

Re: Add audiences remarketing website visitors to campaign

Hi,

Once you have created audiences using the AddAudience.php example, you need to add a CampaignCriterion of type CriterionUserList. Please note that a UserList can only be excluded from a Campaign. To actively target a UserList, you need to create a CriterionUserList at the AdGroup level using the code below: 


$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);

The table provided here shows the options available for different criterion types at the campaign and ad group level. 

Regards,
Shwetha, AdWords API Team.
 

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+unsubscribe@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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/59455b55-86b6-4a53-a8e3-7633bd71624b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment