younifyd
Menu

Get Campaign Analytics

Get analytics of campaigns

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

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Campaign Analytics action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getCampaignAnalytics.response.data}}.

Request

Path parameters

applicationIdinteger (int64)required

The ID of the Application. It is displayed in your Talon.One deployment URL.

campaignIdinteger (int64)required

The ID of the campaign. It is displayed in your Talon.One deployment URL.

Query parameters

rangeStartstring (date-time)required

Only return results from after this timestamp. > [!note] **Note** > - This must be an RFC3339 timestamp string. > - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting > considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.

rangeEndstring (date-time)required

Only return results from before this timestamp. > [!note] **Note** > - This must be an RFC3339 timestamp string. > - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting > considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.

granularitystring

The time interval between the results in the returned time-series.

One of1 hour1 day1 week1 month1 year

Response

Returns 200 with an object. Read it in later steps with {{getCampaignAnalytics.response.data.<field>}}.

totalResultSizeinteger (int64)
dataarray<object>
datestring (date-time)required
campaignRevenuenumberrequired

Amount of revenue in this campaign (for coupon or discount sessions).

totalCampaignRevenuenumberrequired

Amount of revenue in this campaign since it began (for coupon or discount sessions).

campaignRefundnumberrequired

Amount of refunds in this campaign (for coupon or discount sessions).

totalCampaignRefundnumberrequired

Amount of refunds in this campaign since it began (for coupon or discount sessions).

campaignDiscountCostsnumberrequired

Amount of cost caused by discounts given in the campaign.

totalCampaignDiscountCostsnumberrequired

Amount of cost caused by discounts given in the campaign since it began.

campaignRefundedDiscountsnumberrequired

Amount of discounts rolledback due to refund in the campaign.

totalCampaignRefundedDiscountsnumberrequired

Amount of discounts rolledback due to refund in the campaign since it began.

campaignFreeItemsinteger (int64)required

Amount of free items given in the campaign.

totalCampaignFreeItemsinteger (int64)required

Amount of free items given in the campaign since it began.

couponRedemptionsinteger (int64)required

Number of coupon redemptions in the campaign.

totalCouponRedemptionsinteger (int64)required

Number of coupon redemptions in the campaign since it began.

couponRolledbackRedemptionsinteger (int64)required

Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.

totalCouponRolledbackRedemptionsinteger (int64)required

Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.

referralRedemptionsinteger (int64)required

Number of referral redemptions in the campaign.

totalReferralRedemptionsinteger (int64)required

Number of referral redemptions in the campaign since it began.

couponsCreatedinteger (int64)required

Number of coupons created in the campaign by the rule engine.

totalCouponsCreatedinteger (int64)required

Number of coupons created in the campaign by the rule engine since it began.

referralsCreatedinteger (int64)required

Number of referrals created in the campaign by the rule engine.

totalReferralsCreatedinteger (int64)required

Number of referrals created in the campaign by the rule engine since it began.

addedLoyaltyPointsnumberrequired

Number of added loyalty points in the campaign in a specific interval.

totalAddedLoyaltyPointsnumberrequired

Number of added loyalty points in the campaign since it began.

deductedLoyaltyPointsnumberrequired

Number of deducted loyalty points in the campaign in a specific interval.

totalDeductedLoyaltyPointsnumberrequired

Number of deducted loyalty points in the campaign since it began.

json
{
  "totalResultSize": 1,
  "data": [
    {
      "date": {},
      "couponRolledbackRedemptions": 2,
      "totalCouponRolledbackRedemptions": 4,
      "campaignRefundedDiscounts": 5.637376656633329,
      "totalDeductedLoyaltyPoints": 220,
      "couponRedemptions": 9,
      "totalCampaignDiscountCosts": 5.962133916683182,
      "referralRedemptions": 7,
      "totalCampaignRevenue": 5784.63,
      "campaignRevenue": 3539.76,
      "campaignDiscountCosts": 1.4658129805029452,
      "totalReferralRedemptions": 1,
      "couponsCreated": 1,
      "addedLoyaltyPoints": 250,
      "campaignRefund": 0.8008281904610115,
      "campaignFreeItems": 7,
      "totalAddedLoyaltyPoints": 340,
      "totalCampaignFreeItems": 86,
      "totalCampaignRefundedDiscounts": 2.3021358869347655,
      "totalCampaignRefund": 6.027456183070403,
      "totalCouponsCreated": 1,
      "deductedLoyaltyPoints": 120,
      "totalCouponRedemptions": 3,
      "referralsCreated": 6,
      "totalReferralsCreated": 7
    }
  ]
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.