POST /api/v1/client-api/metrics/analytics/

Truy xuất dữ liệu phân tích

Truy xuất dữ liệu phân tích để có thông tin chi tiết về hành vi người dùng và các chỉ số hiệu suất nhằm sử dụng thêm trong các biểu đồ.

Doanh thu từ endpoint này dựa trên sự kiện: mỗi giá trị được quy cho ngày giao dịch — ngày diễn ra giao dịch mua, gia hạn hoặc hoàn tiền. Để quy doanh thu theo ngày cài đặt của từng người dùng (ví dụ: để đối chiếu với Ads Manager), hãy sử dụng endpoint cohort (POST /api/v1/client-api/metrics/cohort/).

Giới hạn tốc độ: 2 yêu cầu mỗi giây.

Request body

chart_idstringrequired

Chỉ định biểu đồ bạn cần. Bạn chỉ có thể chỉ định một loại biểu đồ trong mỗi yêu cầu.

One of: "revenue", "mrr", "arr", "arppu", "subscriptions_active", "subscriptions_new", "subscriptions_renewal_cancelled", "subscriptions_expired", "trials_active", "trials_new", "trials_renewal_cancelled", "trials_expired", "grace_period", "billing_issue", "refund_events", "refund_money", "non_subscriptions", "arpu", "installs"

filtersobjectrequired
datearray of stringrequired

Nhập ngày hoặc khoảng thời gian bạn muốn truy xuất dữ liệu biểu đồ

compare_datearray of string

Nhập ngày hoặc khoảng thời gian để so sánh

storearray of string

Lọc theo cửa hàng ứng dụng nơi thực hiện giao dịch mua

countryarray of string

Lọc theo mã quốc gia 2 chữ cái nơi thực hiện giao dịch mua

store_product_idarray of string

Mã định danh duy nhất của sản phẩm từ cửa hàng ứng dụng

durationarray of string

Chỉ định thời hạn gói đăng ký

attribution_sourcearray of string

Nguồn tích hợp cho attribution

attribution_statusarray of string

Cho biết attribution là organic hay non-organic

attribution_channelarray of string

Kênh marketing dẫn đến giao dịch

attribution_campaignarray of string

Chiến dịch marketing mang lại giao dịch

attribution_adgrouparray of string

Nhóm quảng cáo attribution mang lại giao dịch

attribution_adsetarray of string

Bộ quảng cáo attribution dẫn đến giao dịch

attribution_creativearray of string

Các yếu tố hình ảnh hoặc văn bản cụ thể trong quảng cáo hoặc chiến dịch được theo dõi để đo lường hiệu quả

offer_categoryarray of string

Chỉ định các danh mục ưu đãi bạn muốn truy xuất dữ liệu

offer_typearray of string

Chỉ định các loại ưu đãi bạn muốn truy xuất dữ liệu

offer_idarray of string

Chỉ định các ưu đãi cụ thể bạn muốn truy xuất dữ liệu

period_unitstring

Chỉ định khoảng thời gian để tổng hợp dữ liệu phân tích

One of: "day", "week", "month", "quarter", "year"

date_typestring

Chỉ định ngày nào sẽ được coi là ngày người dùng tham gia

One of: "purchase_date", "profile_install_date"

segmentationstring

Đặt cơ sở để phân khúc

formatstring

Chỉ định định dạng tệp xuất

One of: "json", "csv"

Responses

Đã truy xuất dữ liệu phân tích thành công

Schema

Phản hồi chứa dữ liệu phân tích cho loại biểu đồ được yêu cầu

dataobject

Đối tượng chứa các loại chỉ số khác nhau (revenue, proceeds, net_revenue, v.v.)

Example
{
  "data": {
    "revenue": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    },
    "proceeds": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    },
    "net_revenue": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    }
  }
}

Yêu cầu không hợp lệ

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Không được phép

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Đã vượt quá giới hạn tốc độ. Tối đa 2 yêu cầu mỗi giây cho mỗi API key.