Get conversions stats

48 views
Skip to first unread message

Accountify Apps

unread,
Nov 5, 2020, 5:05:09 AM11/5/20
to AdWords API and Google Ads API Forum

Hi,

I am new to Google Ads API and trying to show ads stats on my web page.My requirement is to show Add To Cart ,Purchase and Checkout action stats for deferent category like campaign and ads group. Below is code query I am using
 $query = "SELECT campaign.id, "
                . "campaign.name, "
                . "segments.conversion_action "
            . "FROM campaign "
            . "WHERE segments.date BETWEEN '2019-01-01' AND '2019-12-31' "
            . "ORDER BY segments.conversion_action  DESC "
            . "LIMIT 50";

After I execute this query I am getting empty response I have tried segments.conversion_action,conversion_action_category,segments.conversion_action_name but every time I got empty response

Also,if I do-not use any segment then I am able to name and id of campaign.I am not sure if I am doing anything wrong any help please.

Google Ads API Forum Advisor Prod

unread,
Nov 5, 2020, 10:50:54 PM11/5/20
to 4ccoun...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for your email.

If you are not being able to retrieve any records, this may be because your campaigns did not have impressions for the specified period in your query. When segmenting a report or by adding any segment fields, zero impressions are excluded automatically. You may find out more by referring to this guide.

If you are still encountering any issues, you may send your customer ID so we can investigate further. You may send the requested details using the Reply privately to author option.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q277L0u:ref

Zweitze

unread,
Nov 6, 2020, 7:32:18 AM11/6/20
to AdWords API and Google Ads API Forum
You should add metrics like metric.conversions
That also serves your requirement to show what at you call "action stats" - your current query does not show that you are interested in any stats.

If you want to include group information then you should not query the campaign resource, that resource will never return group information.
Reply all
Reply to author
Forward
0 new messages