Shared Negative List returning removed campaigns

23 views
Skip to first unread message

Irfan Rafiq

unread,
Jun 6, 2022, 11:20:46 AM6/6/22
to Google Ads Scripts Forum
Hi,

I am using AdsApp.​NegativeKeywordList & fetching a list of campaigns the shared list is linked to, however it appears to be returning a list of all campaigns added and removed from the shared list.

For example on Jan 1st the shared negative list "brand keywords" has 10 campaigns added to it. on Jan 5th, 3 campaigns are removed from the shared negative list. When a request is made to fetch a list of campaigns, then response returns 10 campaigns but should only list 7 since 3 campaigns have been removed.

The following code block is used to fetch a list of campaigns assigned to a shared negative list:

var negativeKeywordLists = AdsApp.negativeKeywordLists()
      .withCondition("shared_set.status = ENABLED")
      .get();

  while (negativeKeywordLists.hasNext()) {
    var negativeKeywordList = negativeKeywordLists.next();

    var campaigns = negativeKeywordList
        .campaigns()
        .withCondition("campaign.status = ENABLED")
        .get();
  }


There is a filterable field campaign_shared_set.status = 'ENABLED' which returns all ENABLED campaigns in shared list, however this filter cannot be set in the AdsApp.NegativeKeywordListSelector. The only columns available are: shared_set.name, shared_set.id, shared_set.status . I have managed to get the correct response instead by using the Ads Report service i.e.

var report = AdsApp.report("SELECT shared_set.name, campaign.id, campaign.name, "+
"campaign.status, campaign_shared_set.status, shared_set.id "+
"FROM shared_set "+
"WHERE "+
"shared_set.type = 'NEGATIVE_KEYWORDS' "+
"AND shared_set.status = 'ENABLED' "+
"AND campaign.status = 'ENABLED' "+
"AND campaign_shared_set.status = 'ENABLED' "
);


var rows = report.rows();

while (rows.hasNext()) {
var row = rows.next();
}


Not sure if this is a bug, a missing filterable column in AdsApp.NegativeKeywordListSelector or I am missing something...

Many Thanks
Irfan



This email and any files transmitted with it contain confidential information and/or privileged or personal advice. This email is intended for the addressee(s) stated above only. If you are not the addressee of the email please do not copy or forward it or otherwise use it or any part of it in any form whatsoever. If you have received this email in error please notify the sender and remove the e-mail from your system. Thank you.

This is an email from the company Just Eat Takeaway.com N.V., a public limited liability company with corporate seat in Amsterdam, the Netherlands, and address at Oosterdoksstraat 80, 1011 DK Amsterdam, registered with the Dutch Chamber of Commerce with number 08142836 and where the context requires, includes its subsidiaries and associated undertakings.

Google Ads Scripts Forum Advisor

unread,
Jun 7, 2022, 1:33:15 AM6/7/22
to adwords...@googlegroups.com
Hi Irfan,

Thank you for reporting this to us. Would it be possible for you to create a simple script reproducing the reported behavior? Kindly provide the following.
  • CID
  • Script name
Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2bcf5i:ref
Reply all
Reply to author
Forward
0 new messages