ÿÿ Truy xuất dữ liệu phân tích (API)
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.

ÿÿÿÿ