Querying Shopping Campaign for specific Product IDs giving wrong values?

35 views
Skip to first unread message

lucas_ro...@brown.edu

unread,
Oct 18, 2016, 12:53:54 PM10/18/16
to AdWords API Forum
Hi all,

We are creating a product monitoring script, which should gather information on specific products by ID in one of our campaigns. We're having success using the Reports API for most metrics, but we would also like to know the current MaxCPC for individual IDs, which Reports does not seem to support.

Instead, we launch a new query for each product ID that looks like this:
var pGroup = AdWordsApp.productGroups().withCondition("ProductGroup CONTAINS '" + row['OfferId'] + "'").withCondition("CampaignName = 'Shopping All Products'").get();

if(pGroup.hasNext()) {
     
var p = pGroup.next();
      curMaxCPC
= p.asItemId().getMaxCpc();
}
where row['OfferId'in our code is the current product ID.

This does return a MaxCPC value, and the value is often correct. But sometimes, it is not!! Having to make sure that the value is in fact the current MaxCPC defeats the purpose of the script.

Is there a better way? Or really any way that works? Our campaign is organized with a single product group containing all of the product IDs.

Thanks in advance

Shwetha Vastrad (AdWords API Team)

unread,
Oct 18, 2016, 1:08:55 PM10/18/16
to AdWords API Forum
Hi Lucas,

On this forum, we support queries related to AdWords API. The question is related to AdWords Scripts. You could post your question on the AdWords Scripts Forum and your issue can be resolved there.

Regards,
Shwetha, AdWords API Team.

lucas_ro...@brown.edu

unread,
Oct 28, 2016, 12:17:37 PM10/28/16
to AdWords API Forum
Whoops, thanks Shwetha!
Reply all
Reply to author
Forward
0 new messages