How to get ShoppingProductAdInfo using Google Ads API Beta

118 views
Skip to first unread message

cv

unread,
Jan 27, 2020, 7:25:40 AM1/27/20
to AdWords API and Google Ads API Forum
Hi,

How I can get the Info about ShoppingProduct Ads using Google Ads API beta?

Thanks,

Google Ads API Forum Advisor Prod

unread,
Jan 27, 2020, 3:22:02 PM1/27/20
to chirag....@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for reaching out. You would be able to fetch data for ShoppingProduct Ads by querying the ad_group_ad resource and use code similar to this example query. Please let me know if you have any further questions.

Thanks and regards,
Xiaoming, Google Ads API Team


 

ref:_00D1U1174p._5001USx07w:ref

cv

unread,
Jan 28, 2020, 4:19:23 AM1/28/20
to AdWords API and Google Ads API Forum
Hi Xiaoming,

Thank you for your response. 

I would also like to say that does I need to pass ad_group.type = SHOPPING_PRODUCT_ADS otherwise it is giving 
Segmentation fault (core dumped).

Thanks

cv

unread,
Jan 28, 2020, 4:22:48 AM1/28/20
to AdWords API and Google Ads API Forum
Hi,

My query looks like

$query = "SELECT
                    segments.date,

                    campaign.id,
                    campaign.name,
                    campaign.status,
                    ad_group.id,
                    ad_group.name,
                    ad_group.status,

                    metrics.clicks,
                    metrics.impressions,
                    metrics.ctr,
                    metrics.cost_micros,
                    metrics.conversions,
                    metrics.cost_per_conversion,
                    metrics.conversions_from_interactions_rate,
                    metrics.average_cpc,
                    metrics.active_view_impressions,
                    metrics.average_cpm,
                    metrics.view_through_conversions,
                    metrics.absolute_top_impression_percentage,
                    metrics.top_impression_percentage,
                    ad_group_ad.ad.id,
                    ad_group_ad.ad.type,
                    ad_group_ad.ad.name,
                    ad_group_ad.status,
                    
                    ad_group_ad.ad.shopping_product_ad,
                    ad_group_ad.ad.shopping_smart_ad
                    
                FROM
                    ad_group_ad
                WHERE
                    ad_group_ad.status = 'ENABLED'
                    AND campaign.status = 'ENABLED'
                    AND ad_group.status = 'ENABLED'
                    AND segments.date >= $startDate AND segments.date <= $endDate";


Thanks,

cv

unread,
Jan 28, 2020, 5:36:02 AM1/28/20
to AdWords API and Google Ads API Forum
I was using like this

$googleAdsRow->getAdGroupAd()->getAd()->getShoppingProductAd();


Thanks

Google Ads API Forum Advisor Prod

unread,
Jan 28, 2020, 3:31:38 PM1/28/20
to chirag....@gmail.com, adwor...@googlegroups.com

Hi,

When you query for the shopping product ad, you need to specify the type by adding ad_group_ad.ad.type = “SHOPPING_PRODUCT_AD” in the WHERE clause. Please let me know if you have any further questions.



Thanks and regards,
Xiaoming, Google Ads API Team


 

ref:_00D1U1174p._5001USx07w:ref

cv

unread,
Jan 28, 2020, 11:43:16 PM1/28/20
to AdWords API and Google Ads API Forum
Hi,

So It would not possible to get all the AdType in one query?
Like I do have Gmail ads, video ads, image ads, text ads, expanded text ads, I do need to go individually for all those ad types?


Thanks,

Google Ads API Forum Advisor Prod

unread,
Jan 29, 2020, 1:02:47 PM1/29/20
to chirag....@gmail.com, adwor...@googlegroups.com

Hi,

You will be able to fetch all the ads of different types in one query but if you would like to fetch SHOPPING_PRODUCT_AD only, specify ad_group_ad.ad.type = “SHOPPING_PRODUCT_AD” in the WHERE clause. 



Thanks and regards,
Xiaoming, Google Ads API Team


 

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