@@ -20,6 +20,21 @@ type GetAnalyticsDataParams struct {
20
20
DateTo time.Time `json:"date_to"`
21
21
22
22
// Items Enum: "unknownDimension" "sku" "spu" "day" "week" "month" "year" "category1" "category2" "category3" "category4" "brand" "modelID"
23
+ // Data grouping available to all sellers:
24
+ // - unknownDimension—unknown,
25
+ // - sku—product identifier,
26
+ // - spu—product identifier,
27
+ // - day—day,
28
+ // - week—week,
29
+ // - month—month.
30
+ // Data grouping available to sellers with Premium subscription:
31
+ // - year—year,
32
+ // - category1—first level category,
33
+ // - category2—second level category,
34
+ // - category3—third level category,
35
+ // - category4—fourth level category,
36
+ // - brand—brand,
37
+ // - modelID—model.
23
38
Dimension []GetAnalyticsDataDimension `json:"dimension"`
24
39
25
40
// Filters
@@ -31,6 +46,30 @@ type GetAnalyticsDataParams struct {
31
46
Limit int64 `json:"limit"`
32
47
33
48
// Specify up to 14 metrics. If there are more, you will get an error with the InvalidArgument code
49
+ // The list of metrics for which the report will be generated.
50
+ //
51
+ // Metrics available to all sellers:
52
+ //
53
+ // - revenue—ordered amount,
54
+ // - ordered_units—ordered products.
55
+ // Metrics available to sellers with Premium subscription:
56
+ // - unknown_metric—unknown metric,
57
+ // - hits_view_search—impressions in search and category,
58
+ // - hits_view_pdp—impressions on the product description page,
59
+ // - hits_view—total impressions,
60
+ // - hits_tocart_search—added to cart from search or category,
61
+ // - hits_tocart_pdp—added to cart from the product description page,
62
+ // - hits_tocart—added to cart total,
63
+ // - session_view_search—sessions with impressions in search or category,
64
+ // - session_view_pdp—sessions with impressions on the product description page,
65
+ // - session_view—sessions total,
66
+ // - conv_tocart_search—conversion to cart from search or category,
67
+ // - conv_tocart_pdp—conversion to cart from a product description page,
68
+ // - conv_tocart—total conversion to cart,
69
+ // - returns—returned products,
70
+ // - cancellations—canceled products,
71
+ // - delivered_units—delivered products,
72
+ // - position_category—position in search and category.
34
73
Metrics []GetAnalyticsDataFilterMetric `json:"metrics"`
35
74
36
75
// Number of elements that will be skipped in the response. For example, if `offset=10`, the response will start with the 11th element found
@@ -95,6 +134,13 @@ type GetAnalyticsDataResultDimension struct {
95
134
}
96
135
97
136
// Specify the period and metrics that are required. The response will contain analytical data grouped by the `dimensions` parameter.
137
+ //
138
+ // There are restrictions for sellers without Premium subscription:
139
+ //
140
+ // - data is available for the last 3 months,
141
+ // - some of the data grouping methods and metrics aren't available.
142
+ //
143
+ // There are no restrictions for sellers with Premium subscription
98
144
func (c Analytics ) GetAnalyticsData (ctx context.Context , params * GetAnalyticsDataParams ) (* GetAnalyticsDataResponse , error ) {
99
145
url := "/v1/analytics/data"
100
146
0 commit comments