[Get info of ads is removed]

107 views
Skip to first unread message

Dương Lê

unread,
May 10, 2018, 3:31:44 AM5/10/18
to AdWords API and Google Ads API Forum
Hi all,

I have a problem. I need get info of removed Ads with API. I try use "Ad Performance Report" with field Status = DISABLED, but it's correct.



Can you help me?

Thanks,
ThanhDuong

Dannison Yao (AdWords API Team)

unread,
May 10, 2018, 5:31:36 AM5/10/18
to AdWords API and Google Ads API Forum
Hi ThanhDuong,

Using that filter should be able to give you information for the removed ads. Strangely, it does not work on your end. Can you please provide me your report definition and your clientCustomerID via Reply privately to author so I can further investigate on this?

Regards,
Dannison
AdWords API Team

Dương Lê

unread,
May 10, 2018, 11:57:07 PM5/10/18
to adwordsapiad...@google.com, AdWords API and Google Ads API Forum
Hi  Dannison,

Thank you for your feeback soon. :))
1. I'm traking marketing, so i need get info of removed ads:


https://support.google.com/adwords/answer/2375362?co=ADWORDS.IsAWNCustomer%3Dfalse&hl=en

Can you differentiate between a Ads get with Status = DISABLED (in  "Ad Performance Report" ) and removed ads on picture above? Which is same?
I view on adwords.google.com and download report form adwords.google.com,  which is different results.

2. I'm try with API:
  report_definition = {
      'reportName': 'Custom date AD_PERFORMANCE_REPORT',
      'dateRangeType': 'CUSTOM_DATE',
      'reportType': 'AD_PERFORMANCE_REPORT',
      'downloadFormat': 'TSV',
      'selector': {
        'dateRange':{'min':report_date,'max':report_date},
        'fields': [
            # Attribute
            'AdGroupId',
            'AdGroupName',
            'Status'
        ],
        'predicates': [
          {
              'field': 'Status',
              'operator': 'EQUALS',
              'values': "enabled"
          }
        ]
      }
    }
I get error : 
googleads.errors.AdWordsReportBadRequestError: Type: SelectorError.INVALID_PREDICATE_ENUM_VALUE
Trigger: enabled
Field Path: selector.reportDefinition.selector

But, i use field  AdGroupName or  AdGroupId, it's completed.

Looking forward to hearing from you soon.

Thanks,
ThanhDuong

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/Pp1SGfq0QI4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ab5076a7-9616-4e10-9e8a-d434db13b554%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dannison Yao (AdWords API Team)

unread,
May 11, 2018, 2:24:30 AM5/11/18
to AdWords API and Google Ads API Forum
Hi ThanhDuong,

To answer your first question, basically, when you remove an ad, it means that you cannot use the ad again and it cannot be recovered. So after removing the ad, the status of that ad automatically becomes DISABLED So to generate reports for removed ads, you should set your status to DISABLED

For your second question, you are getting this error because your predicate for STATUS should be capitalized. Small letters are not recognized as values by the API in this case. 

ex. 

'predicates': [
         {
              'field': 'Status',
              'operator': 'EQUALS',
              'values': "DISABLED"
          }
        ]


Can you also provide your clientCustomerId or a screenshot of your report generated in the UI via Reply privately to author for me to double check if you are not having discrepancies with the results?

Dương Lê

unread,
May 11, 2018, 3:59:13 AM5/11/18
to adwordsapiad...@google.com, AdWords API and Google Ads API Forum
Hi Dannison,

Thank you for your feeback.

My second question is success.
In my first question, I view on site. Status has value such as: Paused, Removed, Ad group removed.....v...v.
But, download report on site or use API Adword, I get it. Status ads: Disabled, Enabled, Paused


​Can you explain for me?
Which is Ad group removed, Paused, Removed on site? When I download report or use API Adword, Is it  DISABLE?
If It's right, How I can just take  Removed Ads, which isn't Ads with Status: Paused, or Ad group removed..v...v..?.
With API Adword.

Thanks,
ThanhDuong

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/Pp1SGfq0QI4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.

Dannison Yao (AdWords API Team)

unread,
May 11, 2018, 6:08:02 AM5/11/18
to AdWords API and Google Ads API Forum
Hi ThanhDuong,

Basically, the statuses you see on UI under "Not eligible to run" means they are not active. 

To further explain this, I will give you some sample scenarios. When you generate ad reports with the status REMOVED (e.g. Campaign removed) then the value you have to set for the status filter is "DISABLED". If you want to generate ad reports with the status PAUSED (e.g. Campaign paused), then the value you have to set for the status filter is "PAUSED". The ENABLED status will generate ad reports that are active and running.

The statuses you see in your drop-down can be filtered using these four statuses: StatusAdGroupStatusCampaignStatus, and CombinedApprovalStatus. However, not all of the statuses in the drop-down are supported, these include Campaign Pending and Campaign Ended. 

Sample Code:
'predicates': [
         {
              'field': 'Status',                  <-------- can be set to Status, AdGroupStatus, CampaignStatus, CombinedApprovalStatus
              'operator': 'EQUALS',
              'values': "DISABLED"      <-------- can be more than 1 value
          }
        ]

Hope this helps.
Reply all
Reply to author
Forward
0 new messages