Hi,

we retrieve our campaigns data from the Google Ads API: Clicks, Costs, 
Impressions etc. by campaign.

I want to add a filter on conversion_action_category = 'PURCHASE' to 
restrict the results only on purchases and want to add 
segmenets.conversion_action_category in fields also. But I receive the 
following error message. 

[
  {
    "error": {
      "code": 400,
      "message": "Request contains an invalid argument.",
      "status": "INVALID_ARGUMENT",
      "details": [
        {
          "@type": 
"type.googleapis.com/google.ads.googleads.v16.errors.GoogleAdsFailure",
          "errors": [
            {
              "errorCode": {
                "queryError": 
"PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE"
              },
              "message": "Cannot select the following segments because at 
least one unsupported metric is found in SELECT or WHERE clause: 
'segments.conversion_action_category'(unsupported metrics: 'average_cost', 
'average_cpc', 'average_cpm', 'average_cpv', 'clicks', 'cost_micros', 
'ctr', 'engagement_rate', 'engagements', 'impressions', 'interaction_rate', 
'interactions', 'video_views')."
            }
          ],
          "requestId": "fZZkpn_bNwMadCHZHsZPzg"
        }
      ]
    }
  }
]

Below is the URL and Param Query we're using:

URL: 
https://googleads.googleapis.com/v16/customers/7731521629/googleAds:searchStream
 
 

ParamQuery : SELECT campaign.name,
                                    campaign.id,
                                    campaign.status,
                                    metrics.average_cost,
                                    metrics.clicks,
                                    metrics.impressions,
                                    metrics.ctr,
                                    metrics.average_cpc,
                                    metrics.interaction_rate,
                                    metrics.interactions,
                                    metrics.all_conversions_value,
                                    metrics.all_conversions,
                                    metrics.cost_micros,
                                    metrics.conversions,
                                    metrics.average_cpm,
                                    metrics.engagement_rate,
                                    metrics.engagements,
                                    metrics.video_views,
                                    metrics.average_cpv,
                                    campaign.campaign_budget,
                                    segments.conversion_action_category
                                FROM campaign WHERE 
segments.conversion_action_category = 'PURCHASE' AND segments.date DURING 
THIS_MONTH

Suggest appropriate solution for this.

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3b1dfb40-9685-41f9-a05f-b655085d2506n%40googlegroups.com.
  • Go... Hashcrypt Devs
    • ... Hashcrypt Devs
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
    • ... Hashcrypt Devs

Reply via email to