How to detect - Ad REMOVED

117 views
Skip to first unread message

Dmitriy P.

unread,
Oct 19, 2020, 5:02:51 PM10/19/20
to AdWords API and Google Ads API Forum
Hi!

How I can detect when Ad is REMOVED for update status on our side db?
I'm try SELECT WHERE change_status.resource_status = 'REMOVED' but not success.
Maybe any another way to detect when Ad was removed?

Thank you in advance!

Google Ads API Forum Advisor Prod

unread,
Oct 20, 2020, 1:23:09 AM10/20/20
to madons...@gmail.com, adwor...@googlegroups.com
Hi,

Thanks for posting your concern.

I am afraid that it is not possible for the Google Ads API to detect the changes in the status of ads in your database. You will need to reach out to the support of the database that you are using to know if this is possible on their product.

However, if you want to retrieve the ads that have 'removed' status in your Google Ads account, then you can use the ad_group_ad report and filter the ad_group_ad.status by comparing this field it with 'REMOVED' value.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q26AUqZ:ref

Dmitriy P.

unread,
Oct 20, 2020, 5:39:56 AM10/20/20
to AdWords API and Google Ads API Forum
I need detect CHANGE STATUS in Google Ads API))

query = """
    SELECT
        change_status.resource_name,
        change_status.last_change_date_time,
        change_status.resource_type,
    FROM change_status
    WHERE change_status.resource_status = 'REMOVED'
    ORDER BY change_status.last_change_date_time"""

response = ads_service.search(customer_id, query=query, page_size=ADS_PAGE_SIZE)

I need get CHANGE STATUS with last_change_date_time.
But response always empty! Ads API was not return any rows by status "REMOVED".
How I can detect in Ads API, what Ad status changed to 'REMOVED'?

For example:
query = f"""
    SELECT
        {query_fields}
    FROM ad_group_ad
    WHERE ad_group_ad.status == 'REMOVED'
    ORDER BY ad_group_ad.ad.id"""

I don't need this method^ becouse it return ALL removed Ads each time.
I need receive only new (last) REMOVED ads FROM change_status.

Google Ads API Forum Advisor Prod

unread,
Oct 20, 2020, 10:15:42 PM10/20/20
to madons...@gmail.com, adwor...@googlegroups.com
Hi,

Thanks for the clarification and providing further details.

To further investigate why the change_status is returning an empty report, could you also provide the complete response logs of this query and the customer ID via Reply privately to author option?

Dmitriy P.

unread,
Oct 21, 2020, 7:07:43 AM10/21/20
to AdWords API and Google Ads API Forum
Sorry^ bu this option is disabled...
How i can fix this?
Screenshot 2020-10-21 at 14.04.27.png

PS:
-----------------------
ADS_PAGE_SIZE = 100

def get(customer_id, ads_client):
ads_service = ads_client.get_service("GoogleAdsService", version="v5")
query = """
    SELECT
        change_status.resource_name,
        change_status.last_change_date_time,
        change_status.resource_type,
        change_status.campaign,
        change_status.ad_group,
        change_status.resource_status,
        change_status.ad_group_ad,
        change_status.ad_group_criterion,
        change_status.campaign_criterion
    FROM change_status
    WHERE change_status.resource_status = 'REMOVED'
    ORDER BY change_status.last_change_date_time"""

response = ads_service.search(customer_id, query=query, page_size=ADS_PAGE_SIZE)

for row in response:
    print(row)

Google Ads API Forum Advisor Prod

unread,
Oct 21, 2020, 10:57:57 PM10/21/20
to madons...@gmail.com, adwor...@googlegroups.com
Hi Dmitriy,

You may send all the relevant details, including your customer ID, directly to our alias googleadsa...@google.com instead, so we can continue our discussion privately.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q26AUqZ:ref

Google Ads API Forum Advisor Prod

unread,
Oct 26, 2020, 4:35:19 AM10/26/20
to madons...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for providing the requested details privately. Let me discuss the issue to my team and rest assured that we will provide updates here.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q26AUqZ:ref

Google Ads API Forum Advisor Prod

unread,
Oct 28, 2020, 3:52:36 AM10/28/20
to madons...@gmail.com, adwor...@googlegroups.com
Hi,

I appreciate your patience to this concern.

I received an update from our team and you can find it below:
"If they change the value to CHANGED rather than REMOVED, they'll see the removed items. The reason it's under the list of CHANGED resources, is because we don't completely delete the resource from the system. We CHANGE the status of the resource from ENABLED to REMOVED. Technically, the resources is still there. That's why they do not see anything coming back with REMOVED. That's because we RARELY actually remove entire resources from the system. They are still there; they just change state."

Let me know if you have further questions.

Dmitriy P.

unread,
Oct 28, 2020, 6:24:15 AM10/28/20
to AdWords API and Google Ads API Forum
Thanks for answer!

Please, tell me, how I can detect resource status is 'REMOVED'?
Because 'change_status' return only 'resource status: CHANGED'
And I don't know 'ENABLED' or 'REMOVED'

Google Ads API Forum Advisor Prod

unread,
Oct 28, 2020, 10:44:14 PM10/28/20
to madons...@gmail.com, adwor...@googlegroups.com
Hi Dmitriy,

As as workaround, you can add the status field of the resources below in the report and compare it with 'REMOVED' value, together with the change_status.resource_status = 'CHANGED'.
ad_group
campaign
customer
feed
feed_item
Reply all
Reply to author
Forward
0 new messages