/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 gán cho ngày giao dịch — ngày xảy ra giao dịch mua, gia hạn hoặc hoàn tiền. Để gán 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
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"
Nhập ngày hoặc khoảng thời gian bạn muốn truy xuất dữ liệu biểu đồ
Nhập ngày hoặc khoảng thời gian để so sánh
Lọc theo cửa hàng ứng dụng nơi giao dịch mua được thực hiện
Lọc theo mã quốc gia 2 chữ cái nơi giao dịch mua diễn ra
ID sản phẩm có kèm tên cửa hàng, được định dạng theo cú pháp <store>:<product_id> — ví dụ app_store:premium_monthly hoặc play_store:premium_sub:monthly-base-plan đối với gói đăng ký Google có base plan. ID sản phẩm không có tiền tố cửa hàng sẽ bị từ chối.
Chỉ định thời hạn gói đăng ký
Tích hợp nguồn cho attribution
Cho biết attribution là organic hay non-organic
Kênh marketing dẫn đến giao dịch
Chiến dịch marketing mang lại giao dịch
Nhóm quảng cáo attribution mang lại giao dịch
Bộ quảng cáo attribution dẫn đến giao dịch
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ả
Chỉ định các danh mục ưu đãi bạn muốn truy xuất dữ liệu
Chỉ định các loại ưu đãi bạn muốn truy xuất dữ liệu
Chỉ định các ưu đãi cụ thể bạn muốn truy xuất dữ liệu
ID nội bộ của Adapty cho các placement cần truy xuất dữ liệu — UUID trong URL placement trên dashboard, không phải ID placement bạn truyền vào SDK
ID nội bộ của Adapty cho các đối tượng của placement cần truy xuất dữ liệu
ID nội bộ của Adapty cho các paywall cần truy xuất dữ liệu — UUID trong URL paywall trên dashboard
ID nội bộ của Adapty cho các flow cần truy xuất dữ liệu — UUID trong URL flow trên dashboard
Các màn hình flow cần truy xuất dữ liệu, mỗi mục được định dạng theo cú pháp <flow_id>:<screen_id> — ví dụ 3f8a1c2e-0b7d-4e5a-9c61-2d4f8e7b1a90:paywall
ID nội bộ của Adapty cho các phân khúc cần truy xuất dữ liệu
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"
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"
Chia dữ liệu thành một chuỗi riêng cho mỗi giá trị của chiều này. Ví dụ, flow_id trả về một chuỗi riêng biệt cho mỗi flow, và placement_id cho mỗi placement.
One of: "period", "renewal_status", "cancellation_reason", "store_product_id", "country", "store", "paywall_id", "audience_id", "placement_id", "flow_id", "flow_screen_id", "segment_id", "duration", "offer_category", "offer_type", "offer_id", "attribution_source", "attribution_status", "attribution_channel", "attribution_campaign", "attribution_adgroup", "attribution_adset", "attribution_creative", "day", "week", "month", "year"
Chỉ định định dạng tệp xuất
One of: "json", "csv"
Responses
Dữ liệu phân tích được truy xuất 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
Đố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
Không được xác thực
Schema
Vượt quá giới hạn tốc độ. Tối đa 2 yêu cầu mỗi giây cho mỗi ứng dụng, được chia sẻ bởi tất cả các API key của ứng dụng đó.