行为分析 API
1. "获取行为分析"
- route definition
- Url: /api/v1/analytics/behavior
- Method: GET
- Request:
BehaviorRequest - Response:
BehaviorResponse
- request definition
go
type BehaviorRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
type BehaviorResponse struct {
TopActions interface{} `json:"topActions"`
UserFlows interface{} `json:"userFlows"`
HeatMap interface{} `json:"heatMap"`
}2. "获取功能采用率"
- route definition
- Url: /api/v1/analytics/behavior/adoption
- Method: GET
- Request:
BehaviorAdoptionRequest - Response:
BehaviorAdoptionResponse
- request definition
go
type BehaviorAdoptionRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
Feature string `form:"feature,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
type BehaviorAdoptionResponse struct {
Features []FeatureAdoption `json:"features"`
}3. "获取采用率明细"
- route definition
- Url: /api/v1/analytics/behavior/adoption/breakdown
- Method: GET
- Request:
BehaviorAdoptionBreakdownRequest - Response:
BehaviorAdoptionBreakdownResponse
- request definition
go
type BehaviorAdoptionBreakdownRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
Feature string `form:"feature"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
type BehaviorAdoptionBreakdownResponse struct {
BySegment interface{} `json:"bySegment"`
ByTime interface{} `json:"byTime"`
}4. "获取行为事件"
- route definition
- Url: /api/v1/analytics/behavior/events
- Method: GET
- Request:
BehaviorEventsRequest - Response:
BehaviorEventsResponse
- request definition
go
type BehaviorEventsRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
EventType string `form:"eventType,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
Limit int `form:"limit,optional,default=100"`
}- response definition
go
type BehaviorEventsResponse struct {
Items []BehaviorEvent `json:"items"`
Total int64 `json:"total"`
}5. "获取行为漏斗"
- route definition
- Url: /api/v1/analytics/behavior/funnel
- Method: POST
- Request:
BehaviorFunnelRequest - Response:
BehaviorFunnelResponse
- request definition
go
type BehaviorFunnelRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
Steps []string `json:"steps"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
type BehaviorFunnelResponse struct {
Steps []FunnelStep `json:"steps"`
}6. "获取行为路径"
- route definition
- Url: /api/v1/analytics/behavior/paths
- Method: GET
- Request:
BehaviorPathsRequest - Response:
BehaviorPathsResponse
- request definition
go
type BehaviorPathsRequest struct {
GameId string `form:"gameId,optional"`
Env string `form:"env,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
Depth int `form:"depth,optional,default=5"`
}- response definition
go
type BehaviorPathsResponse struct {
Paths interface{} `json:"paths"`
}