Facets

Created by David Casado ยท last update April 9, 2020

About this report

This report returns the following metrics distributed by facet for the selected date range: volume of queries, clicks, success, adds to cart, adds to wishlist and checkout.

Request

This report requires a date range. And additionally, a combination of filters can be specified to narrow down the results.

GET https://api.empathybroker.com/stats/v2/{Instance_ID}/Facets

Query Parameters

PARAMETER TYPE
start_date Int (ISO 8601 format)
end_date Int (ISO 8601 format)
filters list[str]

Bearer Token Get your token

Example request: https://api.empathybroker.com/stats/v2/ebdemo/Facets?start_date=2019-07-10&end_date=2019-07-17&filters=lang,scope&lang=es_ES&scope=desktop


Response

The following KPIs are returned:

  • Total values for the date range and filters selected: total queries, total clicks, total adds to wishlist, total adds to cart and total checkouts.
  • Distributed values by facet: number of queries, number of clicks, number of adds to wishlist, number of adds to cart and number of checkouts.
  • Distributed values by facet value: number of queries, number of clicks, number of adds to wishlist, number of adds to cart and number of checkouts.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
    "data": [
        {
            "query_count": 799,
            "click_count": 523,
            "success_count": 473,
            "wishlist_count": 0,
            "add2cart_count": 40,
            "checkout_count": 0,
            "click_count_pct": 65.46,
            "success_count_pct": 59.20,
            "wishlist_count_pct": 0.0,
            "add2cart_count_pct": 5.01,
            "checkout_count_pct": 0.0,
            "facets": [
                {
                    "facet_name": "color",
                    "query_count": 799,
                    "click_count": 523,
                    "success_count": 473,
                    "wishlist_count": 0,
                    "add2cart_count": 40,
                    "checkout_count": 0,
                    "click_count_pct": 65.46,
                    "success_count_pct": 59.20,
                    "wishlist_count_pct": 0.0,
                    "add2cart_count_pct": 5.01,
                    "checkout_count_pct": 0.0,
                    "values": [
                        {
                            "facet_name": "color",
                            "facet_value": "Red",
                            "query_count": 311,
                            "click_count": 201,
                            "success_count": 170,
                            "wishlist_count": 0,
                            "add2cart_count": 21,
                            "checkout_count": 0,
                            "click_count_pct": 64.63,
                            "success_count_pct": 54.66,
                            "wishlist_count_pct": 0.0,
                            "add2cart_count_pct": 6.75,
                            "checkout_count_pct": 0.0
                        },
                        {
                            "facet_name": "color",
                            "facet_value": "Beige",
                            "query_count": 248,
                            "click_count": 124,
                            "success_count": 115,
                            "wishlist_count": 0,
                            "add2cart_count": 4,
                            "checkout_count": 0,
                            "click_count_pct": 50.0,
                            "success_count_pct": 46.37,
                            "wishlist_count_pct": 0.0,
                            "add2cart_count_pct": 1.61,
                            "checkout_count_pct": 0.0
                        },
                        {
                            "facet_name": "color",
                            "facet_value": "Black",
                            "query_count": 240,
                            "click_count": 198,
                            "success_count": 188,
                            "wishlist_count": 0,
                            "add2cart_count": 15,
                            "checkout_count": 0,
                            "click_count_pct": 82.5,
                            "success_count_pct": 78.33,
                            "wishlist_count_pct": 0.0,
                            "add2cart_count_pct": 6.25,
                            "checkout_count_pct": 0.0
                        }
                    ]
                }
            ]
        }
    ],
    "params": {
        "site_id": "ebdemo",
        "start_date": 1583020800000,
        "end_date": 1583366400000,
        "filters": []
    }
}