SCALIX help

← All tools

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

NameTypeRequiredDescription
property_idstringyesGA4 property number (e.g. 123456789) or properties/123456789. From ga4_list_accounts_properties.
dimensionsarray<string>yesFrom the conversions schema listed in the description, e.g. ['campaignName'] or ['defaultChannelGroup'].
metricsarray<string>yesFrom the conversions schema, e.g. ['advertiserAdCost','allConversionsByInteractionDate','returnOnAdSpendByInteractionDate'].
date_rangesarray<object>yes[{startDate,endDate}] as YYYY-MM-DD or relative ('30daysAgo', 'yesterday'), in the property's time zone.
conversion_actionsarray<string>noConversions to count: display names ('purchase') or conversionActions/<id>. Empty: all conversions.
attribution_modelstringnoDATA_DRIVEN (Google's default) or LAST_CLICK.
dimension_filterobjectnoFilterExpression on dimensions.
metric_filterobjectnoFilterExpression on metrics.
order_bysarray<object>noOrderBy objects, e.g. [{'metric':{'metricName':'advertiserAdCost'},'desc':true}].
limitintegernoRows to return, at most 250,000.
offsetintegernoFirst row (0-based), for paging.
currency_codestringnoISO 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 classMeansWhat to doRetry
permission_deniedThe 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_reauthThe 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_argumentGA4 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.