[ZombieSKU ID is not working]

80 views
Skip to first unread message

Csaba Bálint

unread,
Aug 29, 2022, 10:33:06 AM8/29/22
to Google Ads Scripts Forum
Dear Google,

I have a script that doesn't work in the new expreience. 
Here is the script:

// Copy the link of the new sheet and paste it below -
var SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/1hWwzTXhH163YIATbMUMvEmwZx5OAMXoczqMM337xYw0/edit#gid=0";
// Enter your filters below, for multiple filters use AND clause. E.g. Impressions > 100 AND
// Currently default filter is Clicks < 1 i.e. Zero Clicks
//var FILTERS = "Conversions < 1 AND Cost > 10";
var FILTERS = "metrics.clicks < 1"
// Enter time duration below. Possibilities:
// TODAY | YESTERDAY | LAST_7_DAYS | LAST_WEEK | LAST_BUSINESS_WEEK |
//THIS_MONTH | LAST_MONTH |
// LAST_14_DAYS | LAST_30_DAYS | THIS_WEEK_SUN_TODAY |
//THIS_WEEK_MON_TODAY | LAST_WEEK_SUN_SAT
// Currently default time duration is set to: LAST_30_DAYS
var TIME_DURATION = "LAST_30_DAYS";
var COUNT_LIMIT = 999999;
function main(){
var products = getFilteredShoppingProducts();
products.sort(function(a,b){return a[0] > b[0];});
products = products.slice(0, COUNT_LIMIT);
pushToSpreadsheet(products);
}

function getFilteredShoppingProducts(){
  /*
  var query = "SELECT OfferId, Cost, Conversions FROM shopping_performance_view WHERE " +
  FILTERS + " DURING "+ TIME_DURATION;
  */
 
  var query = "SELECT segments.product_item_id, metrics.cost_micros, metrics.conversions FROM shopping_performance_view WHERE " + FILTERS + " AND segments.date DURING " + TIME_DURATION
  var products = [];
    var count = 0;
    var report = AdWordsApp.report(query);
    var rows = report.rows();
    while (rows.hasNext()) {
        var row = rows.next();
        var offer_id = row['OfferId'];
        products.push([offer_id]);
        count += 1;
    }
    Logger.log(count);
    return products;
}
function pushToSpreadsheet(data) {
    var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
    var sheet = spreadsheet.getSheetByName('Custom_Label');
    var lastRow = sheet.getMaxRows();
    sheet.getRange('A2:A' + lastRow).clearContent();
    var start_row = 2;
    var endRow = start_row + data.length - 1;
    var range = sheet.getRange('A' + start_row + ':' + 'A' + endRow);
    if (data.length > 0) {
        range.setValues(data);
    }
    return;
}

Main problem with script is spreadsheet is blank. The script dont able to push my product ID to the spreeadsheet.

Could you help me?

Thanks!

Google Ads Scripts Forum Advisor

unread,
Aug 29, 2022, 3:25:29 PM8/29/22
to adwords...@googlegroups.com
Hello,

Thanks for reaching out. The new experience uses Google Ads API reporting which, by default, omits rows with zero impressions. You have a filter set at the top the script that specifies only rows with 0 clicks are included. It seems possible this is the reason for zero output. I would recommend testing by removing this filter and checking against a similar report in the Ads UI. 

Regards,

Google Logo
Matt
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2dokHE:ref

Csaba Bálint

unread,
Sep 2, 2022, 9:51:15 AM9/2/22
to Google Ads Scripts Forum on behalf of adsscripts
Hello,

Oh I see it, I tested it and it seems to be working fine right now. Thanks for your help!

Bye!

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/foL9sRE5DRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/SPpcA000000000000000000000000000000000000000000000RHE5Y900hIODJGnkTkaa_W5tLtUv5g%40sfdc.net.

Csaba Bálint

unread,
Sep 2, 2022, 9:51:15 AM9/2/22
to Google Ads Scripts Forum on behalf of adsscripts
But the new problem is my spreadsheet is blank. I see the script find the products but it not appear in the spreadsheet. How could I solve this problem?

Thanks,

image.png


image.png



Google Ads Scripts Forum Advisor

unread,
Sep 5, 2022, 1:49:04 AM9/5/22
to adwords...@googlegroups.com

Hello,

 

For us to investigate and replicate the issue, would you be able to provide us your Google Ads CID and Script name of the involved script?

 

Kindly send the details via `Reply privately to author` option. If the said option is not available on your end, you may send those through the email alias <googleadsscr...@google.com> instead.

 

Best Regards,

Google Logo
Angel Maia
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2dokHE:ref

Csaba Bálint

unread,
Sep 6, 2022, 2:35:42 AM9/6/22
to Google Ads Scripts Forum on behalf of adsscripts
Hi,

My Google Ads CID: 386-884-9841
Script name: nem kattintott uj teszt


--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/foL9sRE5DRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum

unread,
Sep 22, 2022, 5:39:55 AM9/22/22
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/foL9sRE5DRc) from the forum as it wasn't routed to our support queue.

Regards,
Yasmin
Google Ads Scripts Team

Google Ads Scripts Forum

unread,
Sep 29, 2022, 6:07:40 AM9/29/22
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/foL9sRE5DRc) from the forum as it wasn't routed to our support queue.

Regards,
Yasmin
Google Ads Scripts Team

Google Ads Scripts Forum

unread,
Oct 6, 2022, 2:15:56 AM10/6/22
to Google Ads Scripts Forum
Hi,

This is Yasmin from the Google Ads scripts team. Please excuse us as the messages from this thread failed to get routed to our support queue. We are humbly asking for your kind understanding on this.

I checked the mentioned script, and I recognized it to be the Low Volume SKU script which is always raised to our team. On that note, we have a copy of the said script and updated it to function properly in the new script experience. The metrics and time duration have been adjusted based on the script you had mentioned.

That said, I attached the script for your convenience. Kindly try it on your end, and let us know how it goes. Please don't forget to supply your spreadsheet URL when generating it.


Regards,
Yasmin
Google Ads Scripts Team

Low Volume SKU.txt
Reply all
Reply to author
Forward
0 new messages