AcquisitionAcquisition

Acquisition

Return acquisition metrics grouped by channel, source, medium, or campaign.

curl -X GET "https://api.hardal.ai/v1/reports/acquisition?tenantId=123e4567-e89b-12d3-a456-426614174000&sourceId=123e4567-e89b-12d3-a456-426614174000&timeframe=today&startDate=example_string&endDate=example_string&timezone=example_string&interval=minute&path=example_string&channel=example_string&source=example_string&device=example_string&os=example_string&country=USA&city=New%20York&eventName=John%20Doe&reportingCurrency=example_string&attributionModel=first_touch&attributionWindowDays=example_string&conversionEventNames=%5B%22John%20Doe%22%5D&eventMetricNames=%5B%22John%20Doe%22%5D&trafficScope=consented_traffic&breakdownMode=channels&campaignsBreakdownMode=all&filterField=source&filterValue=example_string&groupBy=none&columns=example_string&aiFocus=true&limit=example_string&offset=example_string&sortBy=source&sortEventMetricName=John%20Doe&sortDirection=asc" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "range": {
      "startDate": "2026-10-01",
      "endDate": "2026-10-07",
      "timezone": "Europe/Istanbul"
    },
    "previousRange": {
      "startDate": "2026-09-24",
      "endDate": "2026-09-30",
      "timezone": "Europe/Istanbul"
    },
    "currency": {
      "reportingCurrency": "USD",
      "excludedCount": 0
    },
    "controls": {
      "attributionModel": "last_non_direct_touch",
      "attributionWindowDays": 30,
      "conversionEventNames": [
        "purchase"
      ],
      "eventMetricNames": [],
      "trafficScope": "all_traffic",
      "breakdownMode": "channels",
      "campaignsBreakdownMode": "all",
      "filter": null,
      "groupBy": "none",
      "columns": [
        "source",
        "medium",
        "campaign",
        "channel",
        "sessions",
        "conversions",
        "conversion_rate",
        "bounce_rate",
        "revenue",
        "revenue_per_conversion"
      ],
      "aiFocus": false,
      "sortBy": "sessions",
      "sortDirection": "desc"
    },
    "scoreCards": {
      "consentedVisitors": {
        "value": 1840,
        "previousValue": 1600,
        "change": 240,
        "changeRate": 0.15
      },
      "sessions": {
        "value": 4200,
        "previousValue": 3750,
        "change": 450,
        "changeRate": 0.12
      },
      "conversions": {
        "value": 113,
        "previousValue": 105,
        "change": 8,
        "changeRate": 0.0762
      },
      "sessionDuration": {
        "value": 96,
        "previousValue": 88,
        "change": 8,
        "changeRate": 0.0909,
        "formattedValue": "1m 36s",
        "previousFormattedValue": "1m 28s"
      },
      "revenue": {
        "value": 8475,
        "previousValue": 7875,
        "change": 600,
        "changeRate": 0.0762
      }
    },
    "trafficBreakdown": [
      {
        "date": "2026-10-01",
        "sessions": 208,
        "conversions": 5,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-01",
        "sessions": 156,
        "conversions": 5,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-01",
        "sessions": 78,
        "conversions": 3,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-01",
        "sessions": 52,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-01",
        "sessions": 26,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      },
      {
        "date": "2026-10-02",
        "sessions": 240,
        "conversions": 6,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-02",
        "sessions": 180,
        "conversions": 6,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-02",
        "sessions": 90,
        "conversions": 4,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-02",
        "sessions": 60,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-02",
        "sessions": 30,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      },
      {
        "date": "2026-10-03",
        "sessions": 256,
        "conversions": 6,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-03",
        "sessions": 192,
        "conversions": 6,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-03",
        "sessions": 96,
        "conversions": 4,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-03",
        "sessions": 64,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-03",
        "sessions": 32,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      },
      {
        "date": "2026-10-04",
        "sessions": 240,
        "conversions": 6,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-04",
        "sessions": 180,
        "conversions": 6,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-04",
        "sessions": 90,
        "conversions": 4,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-04",
        "sessions": 60,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-04",
        "sessions": 30,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      },
      {
        "date": "2026-10-05",
        "sessions": 264,
        "conversions": 6,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-05",
        "sessions": 198,
        "conversions": 6,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-05",
        "sessions": 99,
        "conversions": 4,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-05",
        "sessions": 66,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-05",
        "sessions": 33,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      },
      {
        "date": "2026-10-06",
        "sessions": 264,
        "conversions": 6,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-06",
        "sessions": 198,
        "conversions": 6,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-06",
        "sessions": 99,
        "conversions": 4,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-06",
        "sessions": 66,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-06",
        "sessions": 33,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      },
      {
        "date": "2026-10-07",
        "sessions": 208,
        "conversions": 5,
        "breakdownKey": "Direct"
      },
      {
        "date": "2026-10-07",
        "sessions": 156,
        "conversions": 5,
        "breakdownKey": "OrganicSearch"
      },
      {
        "date": "2026-10-07",
        "sessions": 78,
        "conversions": 3,
        "breakdownKey": "PaidSearch"
      },
      {
        "date": "2026-10-07",
        "sessions": 52,
        "conversions": 1,
        "breakdownKey": "Referral"
      },
      {
        "date": "2026-10-07",
        "sessions": 26,
        "conversions": 0,
        "breakdownKey": "OrganicSocial"
      }
    ],
    "trafficDistribution": {
      "rows": [
        {
          "source": "direct",
          "medium": "",
          "campaign": "",
          "channel": "Direct",
          "sessions": 1680,
          "conversions": 40,
          "conversion_rate": 0.0238,
          "bounce_rate": 0.44,
          "revenue": 3000,
          "revenue_per_conversion": 75,
          "eventCounts": {}
        },
        {
          "source": "google",
          "medium": "organic",
          "campaign": "",
          "channel": "OrganicSearch",
          "sessions": 1260,
          "conversions": 40,
          "conversion_rate": 0.0317,
          "bounce_rate": 0.38,
          "revenue": 3000,
          "revenue_per_conversion": 75,
          "eventCounts": {}
        },
        {
          "source": "google",
          "medium": "cpc",
          "campaign": "brand_search",
          "channel": "PaidSearch",
          "sessions": 630,
          "conversions": 26,
          "conversion_rate": 0.0413,
          "bounce_rate": 0.41,
          "revenue": 1950,
          "revenue_per_conversion": 75,
          "eventCounts": {}
        },
        {
          "source": "partner.example",
          "medium": "referral",
          "campaign": "",
          "channel": "Referral",
          "sessions": 420,
          "conversions": 7,
          "conversion_rate": 0.0167,
          "bounce_rate": 0.47,
          "revenue": 525,
          "revenue_per_conversion": 75,
          "eventCounts": {}
        },
        {
          "source": "linkedin",
          "medium": "social",
          "campaign": "",
          "channel": "OrganicSocial",
          "sessions": 210,
          "conversions": 0,
          "conversion_rate": 0,
          "bounce_rate": 0.52,
          "revenue": 0,
          "revenue_per_conversion": 0,
          "eventCounts": {}
        }
      ],
      "pagination": {
        "limit": 50,
        "offset": 0,
        "total": 5
      },
      "columns": [
        "source",
        "medium",
        "campaign",
        "channel",
        "sessions",
        "conversions",
        "conversion_rate",
        "bounce_rate",
        "revenue",
        "revenue_per_conversion"
      ],
      "eventMetrics": [],
      "groupBy": "none",
      "sort": {
        "sortBy": "sessions",
        "sortDirection": "desc"
      }
    }
  },
  "timestamp": "2026-11-01T09:30:00.000Z",
  "path": "/v1/reports/acquisition",
  "requestId": "req_01JD2V8Q9Z6R4XK7T3M5N8P2WA"
}
GET
/v1/reports/acquisition
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

OAuth access token (token exchange) or organization API key.

OAuth access token (token exchange) or organization API key.
query
tenantIdstring
Required

UUID of the tenant to report on. Send it exactly once. GET /v1/workspace/access lists the tenants this credential can read.

Format: uuid
query
sourceIdstring

UUID of one source of the tenant. Omit it to include every source of the tenant.

Format: uuid
query
timeframestring

Reporting period. The presets today, yesterday, last7days and last30days cover whole calendar days ending today in the request timezone; last7days is today and the six days before it. Use custom together with startDate and endDate. Defaults to today.

query
startDatestring

First day of a custom period, YYYY-MM-DD, inclusive. Send it only with timeframe=custom, together with endDate.

query
endDatestring

Last day of a custom period, YYYY-MM-DD, inclusive. Send it only with timeframe=custom; it must not be before startDate.

query
timezonestring

IANA time zone name such as Europe/Istanbul or America/New_York. It sets the calendar-day boundaries of the period and of the time buckets. Defaults to Europe/Istanbul.

Min length: 1 • Max length: 100
query
intervalstring

Bucket size of trafficBreakdown. Defaults to day.

query
pathstring

Page path, for example /pricing.

query
channelstring

Marketing channel, for example OrganicSearch.

query
sourcestring

Traffic source, for example google. This is not sourceId.

query
devicestring

Device type, for example desktop or mobile.

query
osstring

Operating system, for example iOS.

query
countrystring

Two-letter country code, for example TR.

query
citystring

City name, for example Istanbul.

query
eventNamestring

Event name, for example purchase.

query
reportingCurrencystring

ISO 4217 currency code, for example USD. Amounts are returned in the tenant's reporting currency.

query
attributionModelstring

How a conversion is credited to a traffic source: first_touch credits the first visit, last_touch the last visit and last_non_direct_touch the last visit that was not direct. Defaults to the tenant's attribution setting.

query
attributionWindowDaysstring

How many days before a conversion a visit can receive credit: 7, 14 or 30. Defaults to the tenant's attribution setting.

Min: 7 • Max: 30
query
conversionEventNamesstring

Event names counted as conversions. Repeat the parameter or separate names with commas. Defaults to the tenant's conversion events; when none are configured, conversions and revenue are 0.

query
eventMetricNamesarray

Up to 10 event names to count on each trafficDistribution row. The counts are returned in eventCounts.

query
trafficScopestring

Which sessions to include by consent: consented_traffic, unconsented_traffic or all_traffic. Defaults to the tenant's setting.

query
breakdownModestring

Dimension of the trafficBreakdown series: channels or campaigns. source and medium are shorthand for campaigns broken down by that field. Defaults to channels.

query
campaignsBreakdownModestring

With breakdownMode=campaigns, break the series down by source, by medium or by both with all. Defaults to all.

query
filterFieldstring

Column to filter trafficDistribution by: source, medium, campaign or channel. Requires filterValue. Score cards and trafficBreakdown are not filtered.

query
filterValuestring

Text to look for in filterField. Case-insensitive and matches part of the value. Requires filterField.

Min length: 1 • Max length: 255
query
groupBystring

Group trafficDistribution rows by one dimension. none returns one row per combination of source, medium, campaign and channel. Defaults to none.

query
columnsstring

Comma-separated columns to return on each trafficDistribution row: source, medium, campaign, channel, sessions, conversions, conversion_rate, bounce_rate, revenue, revenue_per_conversion. Defaults to all.

query
aiFocusstring

true limits the report to traffic from AI assistants such as ChatGPT, Perplexity, Gemini, Claude and Copilot. Defaults to false.

query
limitstring

Maximum number of trafficDistribution rows to return, 1 to 500. Defaults to 50.

Min: 1 • Max: 500
query
offsetstring

Number of trafficDistribution rows to skip, 0 to 10000. Defaults to 0.

Min: 0 • Max: 10000
query
sortBystring

Column to sort trafficDistribution by. event_metric sorts by the event named in sortEventMetricName. Defaults to sessions.

query
sortEventMetricNamestring

Event to sort by when sortBy=event_metric. It must be one of eventMetricNames.

Min length: 1 • Max length: 255
query
sortDirectionstring

asc or desc. Defaults to desc.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. OAuth access token (token exchange) or organization API key.

Query Parameters

tenantIdstring
Required

UUID of the tenant to report on. Send it exactly once. GET /v1/workspace/access lists the tenants this credential can read.

sourceIdstring

UUID of one source of the tenant. Omit it to include every source of the tenant.

timeframestring

Reporting period. The presets today, yesterday, last7days and last30days cover whole calendar days ending today in the request timezone; last7days is today and the six days before it. Use custom together with startDate and endDate. Defaults to today.

startDatestring

First day of a custom period, YYYY-MM-DD, inclusive. Send it only with timeframe=custom, together with endDate.

endDatestring

Last day of a custom period, YYYY-MM-DD, inclusive. Send it only with timeframe=custom; it must not be before startDate.

timezonestring

IANA time zone name such as Europe/Istanbul or America/New_York. It sets the calendar-day boundaries of the period and of the time buckets. Defaults to Europe/Istanbul.

intervalstring

Bucket size of trafficBreakdown. Defaults to day.

pathstring

Page path, for example /pricing.

channelstring

Marketing channel, for example OrganicSearch.

sourcestring

Traffic source, for example google. This is not sourceId.

devicestring

Device type, for example desktop or mobile.

osstring

Operating system, for example iOS.

countrystring

Two-letter country code, for example TR.

citystring

City name, for example Istanbul.

eventNamestring

Event name, for example purchase.

reportingCurrencystring

ISO 4217 currency code, for example USD. Amounts are returned in the tenant's reporting currency.

attributionModelstring

How a conversion is credited to a traffic source: first_touch credits the first visit, last_touch the last visit and last_non_direct_touch the last visit that was not direct. Defaults to the tenant's attribution setting.

attributionWindowDaysstring

How many days before a conversion a visit can receive credit: 7, 14 or 30. Defaults to the tenant's attribution setting.

conversionEventNamesstring

Event names counted as conversions. Repeat the parameter or separate names with commas. Defaults to the tenant's conversion events; when none are configured, conversions and revenue are 0.

eventMetricNamesarray

Up to 10 event names to count on each trafficDistribution row. The counts are returned in eventCounts.

trafficScopestring

Which sessions to include by consent: consented_traffic, unconsented_traffic or all_traffic. Defaults to the tenant's setting.

breakdownModestring

Dimension of the trafficBreakdown series: channels or campaigns. source and medium are shorthand for campaigns broken down by that field. Defaults to channels.

campaignsBreakdownModestring

With breakdownMode=campaigns, break the series down by source, by medium or by both with all. Defaults to all.

filterFieldstring

Column to filter trafficDistribution by: source, medium, campaign or channel. Requires filterValue. Score cards and trafficBreakdown are not filtered.

filterValuestring

Text to look for in filterField. Case-insensitive and matches part of the value. Requires filterField.

groupBystring

Group trafficDistribution rows by one dimension. none returns one row per combination of source, medium, campaign and channel. Defaults to none.

columnsstring

Comma-separated columns to return on each trafficDistribution row: source, medium, campaign, channel, sessions, conversions, conversion_rate, bounce_rate, revenue, revenue_per_conversion. Defaults to all.

aiFocusstring

true limits the report to traffic from AI assistants such as ChatGPT, Perplexity, Gemini, Claude and Copilot. Defaults to false.

limitstring

Maximum number of trafficDistribution rows to return, 1 to 500. Defaults to 50.

offsetstring

Number of trafficDistribution rows to skip, 0 to 10000. Defaults to 0.

sortBystring

Column to sort trafficDistribution by. event_metric sorts by the event named in sortEventMetricName. Defaults to sessions.

sortEventMetricNamestring

Event to sort by when sortBy=event_metric. It must be one of eventMetricNames.

sortDirectionstring

asc or desc. Defaults to desc.

Responses

successboolean
Required
Allowed values:true
dataobject
Required
timestampstring
Required
pathstring
Required
requestIdstring
Required