---
title: "Get analytics of campaigns"
method: GET
path: "/v1/applications/{applicationId}/campaigns/{campaignId}/analytics"
tags: ["Campaigns"]
---

# Get analytics of campaigns

`GET /v1/applications/{applicationId}/campaigns/{campaignId}/analytics`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/applications/{applicationId}/campaigns/{campaignId}/analytics`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/applications/:applicationId/campaigns/:campaignId/analytics/get.ts> (a function with typed inputs; its response is checked against the schema)

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Retrieve statistical data about the performance of the given campaign.

## Path parameters

- `applicationId` integer, required
- `campaignId` integer, required

## Query parameters

- `rangeStart` string, date-time, required
- `rangeEnd` string, date-time, required
- `granularity` '1 hour' | '1 day' | '1 week' | '1 month' | '1 year'

## Response `200`

OK

- object
  - `totalResultSize` integer, required
  - `data` CampaignAnalytics[], required
    - `date` string, date-time, required
    - `campaignRevenue` number, required: Amount of revenue in this campaign (for coupon or discount sessions).
    - `totalCampaignRevenue` number, required: Amount of revenue in this campaign since it began (for coupon or discount sessions).
    - `campaignRefund` number, required: Amount of refunds in this campaign (for coupon or discount sessions).
    - `totalCampaignRefund` number, required: Amount of refunds in this campaign since it began (for coupon or discount sessions).
    - `campaignDiscountCosts` number, required: Amount of cost caused by discounts given in the campaign.
    - `totalCampaignDiscountCosts` number, required: Amount of cost caused by discounts given in the campaign since it began.
    - `campaignRefundedDiscounts` number, required: Amount of discounts rolledback due to refund in the campaign.
    - `totalCampaignRefundedDiscounts` number, required: Amount of discounts rolledback due to refund in the campaign since it began.
    - `campaignFreeItems` integer, required: Amount of free items given in the campaign.
    - `totalCampaignFreeItems` integer, required: Amount of free items given in the campaign since it began.
    - `couponRedemptions` integer, required: Number of coupon redemptions in the campaign.
    - `totalCouponRedemptions` integer, required: Number of coupon redemptions in the campaign since it began.
    - `couponRolledbackRedemptions` integer, required: Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
    - `totalCouponRolledbackRedemptions` integer, required: Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
    - `referralRedemptions` integer, required: Number of referral redemptions in the campaign.
    - `totalReferralRedemptions` integer, required: Number of referral redemptions in the campaign since it began.
    - `couponsCreated` integer, required: Number of coupons created in the campaign by the rule engine.
    - `totalCouponsCreated` integer, required: Number of coupons created in the campaign by the rule engine since it began.
    - `referralsCreated` integer, required: Number of referrals created in the campaign by the rule engine.
    - `totalReferralsCreated` integer, required: Number of referrals created in the campaign by the rule engine since it began.
    - `addedLoyaltyPoints` number, required: Number of added loyalty points in the campaign in a specific interval.
    - `totalAddedLoyaltyPoints` number, required: Number of added loyalty points in the campaign since it began.
    - `deductedLoyaltyPoints` number, required: Number of deducted loyalty points in the campaign in a specific interval.
    - `totalDeductedLoyaltyPoints` number, required: Number of deducted loyalty points in the campaign since it began.

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/7ef1b9504c3a?raw)
