Hello,

I've been wrestling with this for a couple of weeks now and I can really 
use some clues.

I am using API version v201406.  I need to be able to:
1. identify placements (e.g. "about.com") in a running campaign that has 
more than N impressions and,
2. CPC of more than $X and then exclude those placements from the campaign.

For 1., I am using ReportService to get the campaign's 
PLACEMENT_PERFORMANCE_REPORT, which lists its placements along with 
impressions, CPC etc. from which I can select the  placements to be 
excluded.  (The criterionID returned is always "--".)

To remove those placements from the campaigns, I think I need to use 
MutateJobService.mutate, which takes a list of CampaignCriterionOperations, 
each with an Operator ("ADD", "REMOVE", or "SET") and a CampaignCriterion. 
 The CampaignCriterion has a Placement, which has an ID and an URL, and 
this is my problem.  I need to get the placement's criterion ID.  I tried 
using CampaignCriterionService.get on the campaign, passing it (in Ruby):

    selector = {
      :fields => ['CampaignId', 'Id', 'CriteriaType', 'PlacementUrl', ],
      :predicates => [
        { 
          :field => 'CampaignId',
          :operator => 'EQUALS',
          :values => [ campaign_id ]
        },
        {
          :field => 'CriteriaType',
          :operator => 'IN',
          :values => [ 'PLACEMENT' ]
        },
      ],
      :paging => {
        :start_index => 0,
        :number_results => AdwordsCommon::PAGE_SIZE
      }
    }

BUT.  CampaignCriterionService.get returns a set of placement URLs that is 
100% disjoint with the placement URLs that I got from the performance 
report:  the two sets of URLs have nothing in common!  What am I doing 
wrong an what do I actually need to do?  Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/be1e8698-cccc-4f81-bc8e-627a981f2ec7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to