How to get product item id as listed in merchant center feed ?

171 views
Skip to first unread message

que...@itrc.fr

unread,
Sep 22, 2017, 4:29:08 PM9/22/17
to AdWords Scripts Forum
Hi there,

I would like to know if it is possible to get the item id of a product listed in merchant center (and not the ProductItemId who is different)...

Could you help me to retrieve this info ?

Thanks !

Thea Vega (AdWords Scripts Team)

unread,
Sep 25, 2017, 3:14:40 AM9/25/17
to AdWords Scripts Forum
Hi,

Here is an example on how to list all products in merchant center which will return the list of products using the merchant Id.

Let me know if this is what you're looking for.

Thanks,
Thea
AdWords Scripts Team

que...@itrc.fr

unread,
Sep 25, 2017, 3:39:28 AM9/25/17
to AdWords Scripts Forum
Hi 

Yes this is what I'm looking for.

Now, I got another issue.

Could you tell me if it possible to get a list of all merchant center products with the adwords stats for each product (average cpc, ctr, clicks, etc.) ?

Thank you. 

Thea Vega (AdWords Scripts Team)

unread,
Sep 25, 2017, 6:31:48 AM9/25/17
to AdWords Scripts Forum
Hi,

You may use the Shopping Performance Report. See below sample script to get you started.

function main() {
 
var report = AdWordsApp.report(
     
'SELECT MerchantId, AverageCpc, Ctr, Clicks ' + //you can add or remove metrics, segments, and attributes to your liking
     
'FROM   SHOPPING_PERFORMANCE_REPORT ' +
     
'WHERE  Impressions < 10 ' +
     
'DURING LAST_30_DAYS');

 
var rows = report.rows();
 
while (rows.hasNext()) {
   
var row = rows.next();
   
var merchantId = row['MerchantId'];
   
var aveCpc = row['AverageCpc'];
   
var ctr = row['Ctr'];
   
var clicks = row['Clicks'];
   
Logger.log("merchant id: %s | average cpc: %s | ctr: %s | clicks: %s ",merchantId,aveCpc,ctr,clicks);
 
}
}

Hope this helps.

que...@itrc.fr

unread,
Sep 25, 2017, 8:47:41 AM9/25/17
to AdWords Scripts Forum
Thank you Thea.

When I try this code nothing shows up in the log console...

What am I doing wrong ?

que...@itrc.fr

unread,
Sep 25, 2017, 9:08:30 AM9/25/17
to AdWords Scripts Forum
I was just doing a bad request with impressions < 10 ...
could I join the product offer id in the request ?

thank you

Thea Vega (AdWords Scripts Team)

unread,
Sep 26, 2017, 3:17:18 AM9/26/17
to AdWords Scripts Forum
Hi,

You may use the OfferId supported by Shopping Performance Report. 
Reply all
Reply to author
Forward
0 new messages