Attribution Report
hyros_get_attribution_reportRetrieve attribution metrics (ROAS, revenue, cost, ROI) for specific ads, campaigns, or ad sets across platforms. Identify best-performing ads and optimize spend.
Instructions
Get detailed attribution metrics for specific ads, campaigns, or ad sets. Use this to answer "what is my ROAS?", "how much did I earn vs spend?", "which ad has the best ROI?". Requires specifying the level (e.g., facebook_adset, google_campaign) and the IDs to query. Use hyros_get_sources to find source IDs first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Comma-separated IDs based on the level (required, unless level is google_v2_keyword). E.g. for facebook_adset use the adset IDs. Use isAdAccountId=true to provide an ad account ID and get all sources within it. | |
| level | Yes | Attribution level (required): the granularity of the report. Use facebook_adset for Facebook ad sets, google_campaign for Google campaigns, etc. | |
| fields | Yes | Comma-separated metrics (required). Options: revenue,cost,sales,leads,calls,roas,roi,profit,refund,unique_sales,new_leads,cost_per_lead,cost_per_sale,cost_per_call,clicks,impressions,ctr,cpm,cvr,qualified_calls,unqualified_calls,30_days_ltv,90_days_ltv,1_year_ltv,new_mrr,churn_rate,aov,cac,name,parent_name. Example: "revenue,cost,sales,leads,roas,roi" | |
| pageId | No | Pagination page ID | |
| endDate | Yes | Report end date in ISO 8601 format, e.g. 2024-01-31T23:59:59 (required) | |
| currency | No | Currency for monetary values (default: user_currency) | |
| pageSize | No | Results per page (1-250) | |
| startDate | Yes | Report start date in ISO 8601 format, e.g. 2024-01-01T00:00:00 (required) | |
| isAdAccountId | No | If true, the ids field should contain a single ad account ID and the report will include all sources in that account at the specified level | |
| attributionModel | Yes | Attribution model: last_click (last touch), scientific (AI-based), first_click (first touch) | |
| dayOfAttribution | No | If true, filter by click date instead of sale date | |
| timeGroupingOption | No | How to group the results (default: source_link) | |
| scientificDaysRange | No | Day range (1-30) for first ad attribution in scientific model (default: 30) | |
| sourceConfiguration | No | Filter by organic/paid sources (default: ignore_organic) | |
| windowAttributionDaysRange | No | Days range for attribution window (0-365, default: 0) |