Keywords and Smart Shopping

47 views
Skip to first unread message

Harsha Nandiwada

unread,
Mar 24, 2022, 5:06:31 PM3/24/22
to Google Ads API and AdWords API Forum
Hi,
I'm trying to get metrics on the level of ad_group_ad. We use the below query:
query = """
        SELECT
          ad_group_ad.ad.id,
          ad_group_ad.ad.name,
          ad_group.name,
          ad_group.status,
          campaign.name,
          segments.date,
          segments.keyword.info.text,
          metrics.impressions,
          metrics.clicks,
          metrics.conversions,
          metrics.conversions_value,
          metrics.interactions,
          metrics.cost_micros
        FROM ad_group_ad
        WHERE segments.date DURING TODAY
        ORDER BY segments.date
        """

This works in general, but for one customer in particular, it returns an empty array. The query returns a full list when we move the segments.keyword.info.text section. The customer only uses Smart Shopping campaigns.
I'm wondering if there is a way to get the full list, WITHOUT removing the keyword query. Is there some way to get a default empty value if there are no keywords etc? Is there a solution to this sort of problem that you've seen before?

Thanks,
Harsha Nandiwada

Google Ads API Forum Advisor

unread,
Mar 25, 2022, 9:09:16 AM3/25/22
to har...@trackstarhq.com, adwor...@googlegroups.com
Hi Harsha,

Thanks for reaching out. Smart shopping campaigns use product groups instead of keywords, so using a keyword segment in your query will not return any results in your report. Have other smart shopping campaigns returned results using the keyword text segment?

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2YrFyb:ref

Harsha Nandiwada

unread,
Mar 25, 2022, 6:53:27 PM3/25/22
to Google Ads API and AdWords API Forum
[Replied in an email but not sure if that's visible, so reposting here]
Hi,
This is the first time we've encountered Smart Shopping campaigns, so we haven't seen this work with other Smart Shopping campaigns. But, it would be great if the query didn't return empty because a queried field didn't exist; for example, if we got 
results {
  campaign {
    resource_name: "customers/6638032144/campaigns/13575782069"
    name: "Smart Campaign | Flyport USB Hubs"
  }
  ad_group {
    resource_name: "customers/6638032144/adGroups/127398983241"
    status: ENABLED
    name: "Ad group"
  }
  metrics {
    clicks: 26
    conversions_value: 0.0
    conversions: 0.0
    cost_micros: 27390000
    impressions: 5471
    interactions: 26
  }
  ad_group_ad {
    resource_name: "customers/6638032144/adGroupAds/127398983241~528586995568"
    ad {
      resource_name: "customers/6638032144/ads/528586995568"
      id: 528586995568
    }
  }
 
  segments {
    date: "2022-03-25"
     keyword {
        info {
           text: "" OR None, etc.
        }
     }
  }
}

for an ad group without a keyword.
More generally - if a queried record (ad_group_ad) does not have a field that we asked for (like keyword.info.text), is there a way to fill it in with a default value rather than excluding it entirely? Or, is there a well-known workaround for this? Do you have a recommended path forward?
Thanks,
Harsha

Google Ads API Forum Advisor

unread,
Mar 28, 2022, 3:34:34 AM3/28/22
to har...@trackstarhq.com, adwor...@googlegroups.com
Hi Harsha,

Thank you for your reply. 

Unfortunately, including a segments field in query such as the segments.keyword.info.match_type would not return rows if there are none that can be associated to the said segments field. This section of our segmentation guide explains more regarding this behavior. I hope this helps.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


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