google-ads-api icon indicating copy to clipboard operation
google-ads-api copied to clipboard

ad_group.id not being returned when requested

Open jono-allen opened this issue 3 years ago • 0 comments

When running this query, querying for ad group id, we are seeing an odd key come back idfromclick_viewwhereclick_view. Has anyone seen this sort of thing before?

This is the query

SELECT click_view.ad_group_ad, click_view.gclid, campaign.name, ad_group.name, segments.slot,
		segments.click_type, segments.ad_network_type, segments.date, campaign.id, ad_group.id
FROM click_view
WHERE click_view.gclid = '<CLICK_ID>' and segments.date ='<DATE>'

This is the result.

[
  {
    click_view: {
      ad_group_ad: 'customers/a/adGroupAds/a~b',
      gclid: 'zzz',
      resource_name: 'customers/x/clickViews/a-date~x'
    },
    campaign: {
      name: 'foo',
      id: 123,
      resource_name: 'customers/y/campaigns/y'
    },
    ad_group: {
      name: 'b',
      idfromclick_viewwhereclick_view: null, <---- this field here
      resource_name: 'customers/x/adGroups/x'
    },
    segments: { slot: 3, click_type: 1, ad_network_type: 1, date: 'a-date' }
  }
]

Would expect the result to be

{
   ...rest
   ad_group: {
        name: 'b',
        id: 'x', <---- this field here
        resource_name: 'customers/x/adGroups/x'
    }
 }

jono-allen avatar Jul 20 '22 01:07 jono-allen