ga4_run_conversions_report
Google Analytics 4 read low risk
Part of the Attribution Agent.
What it does
Run a GA4 conversions report (Analytics Data API v1alpha runReport with a conversionSpec): ad cost, clicks, impressions, conversions, revenue and ROAS from GA4's advertising section, under the attribution model you choose (DATA_DRIVEN, Google's default, or LAST_CLICK). Use it instead of ga4_run_report for ROAS, cost per conversion or attribution questions. conversion_actions limits it to some conversions: their names as GA4 shows them (e.g. 'purchase', 'generate_lead'; looked up in the property's metadata, an unknown name is refused with the property's list) or conversionActions/<id>; empty means all. Google's conversions schema takes these dimensions: campaignName, continent, country, defaultChannelGroup, deviceCategory, medium, platform, primaryChannelGroup, source, sourceMedium, sourcePlatform, subcontinent; and these metrics: advertiserAdClicks, advertiserAdCost, advertiserAdCostPerClick, advertiserAdImpressions, advertiserAdCostPerAllConversionsByConversionDate / ByInteractionDate, allConversionsByConversionDate / ByInteractionDate, returnOnAdSpendByConversionDate / ByInteractionDate, totalRevenueByConversionDate / ByInteractionDate. Returns runReport rows (dimension_values, metric_values) with metadata (currency, time zone). ALPHA: Google offers this only in v1alpha and says it "may not be available to your Google Analytics property". Read-only.
When to use it
Use for ROAS, cost per conversion, revenue by campaign or channel, or a DATA_DRIVEN vs LAST_CLICK comparison inside GA4. For traffic and engagement use ga4_run_report.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
property_id | string | yes | GA4 property number (e.g. 123456789) or properties/123456789. From ga4_list_accounts_properties. |
dimensions | array<string> | yes | From the conversions schema listed in the description, e.g. ['campaignName'] or ['defaultChannelGroup']. |
metrics | array<string> | yes | From the conversions schema, e.g. ['advertiserAdCost','allConversionsByInteractionDate','returnOnAdSpendByInteractionDate']. |
date_ranges | array<object> | yes | [{startDate,endDate}] as YYYY-MM-DD or relative ('30daysAgo', 'yesterday'), in the property's time zone. |
conversion_actions | array<string> | no | Conversions to count: display names ('purchase') or conversionActions/<id>. Empty: all conversions. |
attribution_model | string | no | DATA_DRIVEN (Google's default) or LAST_CLICK. |
dimension_filter | object | no | FilterExpression on dimensions. |
metric_filter | object | no | FilterExpression on metrics. |
order_bys | array<object> | no | OrderBy objects, e.g. [{'metric':{'metricName':'advertiserAdCost'},'desc':true}]. |
limit | integer | no | Rows to return, at most 250,000. |
offset | integer | no | First row (0-based), for paging. |
currency_code | string | no | ISO 4217 code for money values; default the property's currency. |
Safeguards
Policy
GA4 is a separate Google product, scope and property from Google Ads: read only what the connected Google account is authorized to see (analytics.readonly), never another tenant's properties, and never merge GA4 figures with Google Ads figures without labeling each.
Reminder
These are GA4's attributed conversions and its imported ad cost, not Google Ads' own conversion columns; label the source and the attribution model.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
permission_denied | The connected Google account has no access to that property. | Ask the property's admin to add that Google account as Viewer (GA4 Admin -> Property access management). | no |
needs_reauth | The Google connection's token is dead, or it was made before Scalix asked for Google Analytics. | Reconnect Google in the Scalix dashboard and accept the Google Analytics permission. | no |
invalid_argument | GA4 rejected the request, or a field is malformed; the message names the field. | Fix what the message names (check names with ga4_get_metadata) and call again. | no |
Edge cases
- A property without linked ad platforms returns cost 0; GA4 shows ad cost only for linked Google Ads (and imported cost) data.
- A dimension or metric outside the conversions schema is refused by Google with invalid_argument.
- ByConversionDate and ByInteractionDate metrics differ by when the conversion is dated; do not mix them in one comparison.