Ahmed
Ahmed

Reputation: 11

UA Dimensions & Metrics

I am using the GA4 (Google.Apis.AnalyticsReporting.v4) reporting API to create a dashboard for my company. I noticed that if you select the following dimension:-

TIME/ga:dateHourMinute,
ADWORDS/ga:adwordsCampaignID
ADWORDS/ga:adwordsAdGroupID 

with METRICS:-

ga:impressions, 
ga:CPC 
ga:adCost no data is returned

BUT if you change the selection to dimensions:-

TIME/ga:date, 
ADWORDS/ga:adwordsCampaignID, 
ADWORDS/ga:adwordsAdGroupID 

with METRICS:-

ga:impressions, 
ga:CPC
ga:adCost

data is returned. Does anyone know how to get the first query to return data?

Upvotes: 1

Views: 785

Answers (1)

Brett
Brett

Reputation: 1289

The dimension ga:dateHourMinute is not compatible with the metrics ga:impressions, ga:CPC, and ga:adCost. Google Analytics does not store these metrics broken down by date, hour, and minute. If you send the first query, you will get that the dimensions and metrics are incompatible:

incompatible response

You can visit the dimension & metric explorer to plan a query for compatible dimensions and metrics. If you check the fields ga:adwordsCampaignID, ga:adwordsAdGroupID, ga:impressions, ga:CPC, and ga:adCost, then the dimension ga:dateHourMinute is grayed out to signify incompatibility:

ga:dateHourMinutes is incompatible

Upvotes: 1

Related Questions