SVM
SVM

Reputation: 11

How to get adCost from the new Google Analytics Data API (GA4)?

Written a script to export data from the Google Analytics Data API to MySQL. Works like a charm. Now I wanted to add adCost as a metric, but it doesn't show up in the list of metrics in the documentation. Also nothing like it (searched for things with 'spend' and 'cost'). In the old (Reporting) API it has always been available.

Doesn't Google offer this metric in the new API or is it just that it's not in the list. And if so, what would be the exact name for it?

Upvotes: 1

Views: 1429

Answers (1)

tiezkoz
tiezkoz

Reputation: 61

Google announced the update this week on 19-10-2022:

On behalf of the Google Analytics team I would like to announce the following updates to the Google Analytics Data API:

New Ads metrics added to the API Schema:

  • advertiserAdClicks Ads clicks. Total number of times users have clicked on an ad to reach the property.
  • advertiserAdCost Ads cost. The total amount you paid for your ads.
  • advertiserAdCostPerClick Ads cost per click. Ads cost per click is ad cost
  • advertiserAdCostPerConversion Cost per conversion. Cost per conversion is ad cost divided by conversions.
  • advertiserAdImpressions Ads impressions. The total number of impressions.
  • returnOnAdSpend Return on ad spend. Return On Ad Spend (ROAS) is total revenue divided by advertiser ad cost.

https://groups.google.com/g/google-analytics-api-notify/c/rdmuC8IpBoQ/m/OSnFcLT9AQAJ

The new ads metrics are now also listed in the GA4 API documentation.

Upvotes: 0

Related Questions