Ad groups in Change events result has no ID attribute

68 views
Skip to first unread message

Mike Fang

unread,
Oct 18, 2023, 5:58:31 AM10/18/23
to Google Ads API and AdWords API Forum
Hi Team,
I query a change events and get three updated ad groups
I assume the returned ad groups should have ID attribute
But two of the three ad groups have no ID attribute which doesn't meet my expection
Could you help me check why there are ad groups without ID?

D, [2023-10-18T17:44:13.753971 #89715] DEBUG -- : Outgoing request: Headers: {"developer-token":"REDACTED","login-customer-id":"9677213623","x-goog-api-client":"gl-ruby/3.1.3 gccl/23.0.0 gax/0.9.0 gapic/23.0.0 grpc/1.53.2","x-goog-request-params":"customer_id=3601885092"} Payload: {"customerId":"3601885092","query":"SELECT\n change_event.change_date_time,\n change_event.change_resource_type,\n change_event.new_resource\nFROM\n change_event\nWHERE\n change_event.change_date_time <= '2023-10-19'\n AND\n change_event.change_date_time >= '2023-10-17'\nLIMIT 10000\n"} D, [2023-10-18T17:44:13.757015 #89715] DEBUG -- : Incoming response: Payload: {"results":[{"changeEvent":{"resourceName":"customers/3601885092/changeEvents/1697614646101424~0~0","changeDateTime":"2023-10-18 00:37:26.101424","changeResourceType":"AD_GROUP","newResource":{"adGroup":{"resourceName":"customers/3601885092/adGroups/154343920483","id":"154343920483","name":"NEW LI (Google ADS - 101320023) #3","status":"PAUSED","type":"DISPLAY_STANDARD","adRotationMode":"OPTIMIZE","baseAdGroup":"customers/3601885092/adGroups/158265358207","campaign":"customers/3601885092/campaigns/20655540410","cpcBidMicros":"10000","cpmBidMicros":"10000","targetCpmMicros":"10000","targetingSetting":{"targetRestrictions":[{"targetingDimension":"AGE_RANGE","bidOnly":true},{"targetingDimension":"GENDER","bidOnly":true},{"targetingDimension":"PARENTAL_STATUS","bidOnly":true},{"targetingDimension":"INCOME_RANGE","bidOnly":true}]}}}}},{"changeEvent":{"resourceName":"customers/3601885092/changeEvents/1697614661604879~0~0","changeDateTime":"2023-10-18 00:37:41.604879","changeResourceType":"AD_GROUP","newResource":{"adGroup":{"status":"ENABLED"}}}},{"changeEvent":{"resourceName":"customers/3601885092/changeEvents/1697621375678591~0~0","changeDateTime":"2023-10-18 02:29:35.678591","changeResourceType":"AD_GROUP","newResource":{"adGroup":{"name":"NEW LI (Google ADS - 101320023) #21"}}}},{"changeEvent":{"resourceName":"customers/3601885092/changeEvents/1697621577280527~0~0","changeDateTime":"2023-10-18 02:32:57.280527","changeResourceType":"AD_GROUP","newResource":{"adGroup":{"name":"NEW LI (Google ADS - 101320023) #211"}}}}],"fieldMask":"changeEvent.changeDateTime,changeEvent.changeResourceType,changeEvent.newResource"}

Google Ads API Forum Advisor

unread,
Oct 18, 2023, 10:17:45 AM10/18/23
to mike...@placements.io, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that, when you query the change events for ad groups, few of the returned ad groups have no ID attribute.

Kindly note that the Google Ads API mirrors the Google Ads UI. With that, please provide us with the uncropped UI screenshot of the report you are trying to duplicate via the google Ads API.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pUA3T:ref"

Thanks,
 
Google Logo Google Ads API Team


Mike Fang

unread,
Oct 18, 2023, 10:43:08 PM10/18/23
to Google Ads API and AdWords API Forum
Hi,
I would like to know any campaigns, ad groups, assets change during a period of time. like if there are new campaigns, ad groups, assets added/updated/renamed...etc

thanks

Screenshot 2023-10-19 at 10.41.40 AM.png

Mike Fang

unread,
Oct 18, 2023, 10:59:00 PM10/18/23
to Google Ads API and AdWords API Forum
uncropped UI screenshot
Screenshot 2023-10-19 at 10.57.31 AM.png

Mike Fang

unread,
Oct 23, 2023, 4:09:00 AM10/23/23
to Google Ads API and AdWords API Forum
Hi,
Is there any update from you?

Thanks

Google Ads API Forum Advisor

unread,
Oct 25, 2023, 3:56:00 AM10/25/23
to mike...@placements.io, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

I would like to inform you that there are two possible reasons why the ad groups you queried do not have an ID attribute:
  1. The ad groups are new and have not yet been assigned an ID.
  2. The ad groups have been deleted, but the change event still contains a reference to them.
To determine which of these reasons is the case, you can check the operation field in the change event. If the operation field is set to ADD, then the ad group is new and does not yet have an ID. If the operation field is set to REMOVE, then the ad group has been deleted. If the operation field is set to UPDATE and the ad group does not have an ID.

Also, please be informed that the Ad groups that have been deleted will be removed from the change event history after 30 days. This means that if you are querying change events for a period of time that is more than 30 days in the past, you may see some ad groups that do not have an ID attribute. This is because these ad groups have been deleted, but the change event history still contains a reference to them.

I hope this helps. Kindly get back to us if you have any further queries.
Reply all
Reply to author
Forward
0 new messages