Skip to content

Rules

With Rule Reporting API you can get aggregated statistics about impressions (triggered rules) given to visitors and goals that were reached with those impressions.

Room rule report

An example request

1
GET https://api.giosg.com/api/reporting/v1/rooms/b0a1d32b-e82c-11e4-b081-6c4008adf7e8/rules/daily/?start_date=2016-03-10&end_date=2016-03-25

An example response

  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
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
  "room_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
  "start_date": "2016-05-05",
  "end_date": "2016-05-07",
  "total_impression_count": 874822,
  "session_with_impression_count": 606945,
  "visitor_with_impression_count": 306945,
  "total_goal_count": 95950,
  "total_purchase_count": 25950,
  "conversion_rate": "15.80",
  "goals": [
    {
      "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
      "count": 15000,
      "conversion_rate": "12.20"
    },
    {
      "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
      "count": 12340,
      "conversion_rate": "11.05"
    }
  ],
  "currencies": [
    "EUR",
    "USD",
    "GBP",
  ],
  "purchases_by_currency": [
    {
      "code": "EUR",
      "purchase_count": 95000,
      "sales_value": "23234.20",
      "avg_value_per_buyer": "2.45"
    },
    {
      "code": "USD",
      "purchase_count": 910,
      "sales_value": "9100.00",
      "avg_value_per_buyer": "10.00"
    },
    {
      "code": "GBP",
      "purchase_count": 50,
      "sales_value": "850.76",
      "avg_value_per_buyer": "17.01"
    }
  ],
  "by_date": [
    {
      "date": "2016-05-05",
      "impression_count": 1563,
      "session_with_impression_count": 122,
      "visitor_with_impression_count": 90,
      "purchase_count": 3,
      "goal_count": 95,
      "conversion_rate": "2.00",
      "goals": [
        {
          "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
          "count": 5000,
          "conversion_rate": "12.20"
        },
        {
          "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
          "count": 4000,
          "conversion_rate": "11.05"
        }
      ],
      "currencies": [
        "EUR",
        "USD"
      ],
      "purchases_by_currency": [
        {
          "code": "EUR",
          "purchase_count": 95000,
          "sales_value": "23234.20",
          "avg_value_per_buyer": "2.45"
        },
        {
          "code": "USD",
          "purchase_count": 910,
          "sales_value": "9100.00",
          "avg_value_per_buyer": "10.00"
        }
      ]
    },
    {
      "date": "2016-05-06",
      "impression_count": 1936,
      "session_with_impression_count": 299,
      "visitor_with_impression_count": 255,
      "purchase_count": 1,
      "goal_count": 9,
      "conversion_rate": "0.00",
      "goals": [
        {
          "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
          "count": 5000,
          "conversion_rate": "12.20"
        },
        {
          "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
          "count": 4000,
          "conversion_rate": "11.05"
        }
      ],
      "currencies": [
        "EUR",
        "GBP"
      ],
      "purchases_by_currency": [
        {
          "code": "EUR",
          "purchase_count": 95000,
          "sales_value": "23234.20",
          "avg_value_per_buyer": "2.45"
        },
        {
          "code": "GPB",
          "purchase_count": 910,
          "sales_value": "9100.00",
          "avg_value_per_buyer": "10.00"
        }
      ]
    },
    {
      "date": "2016-05-07",
      "impression_count": 1936,
      "session_with_impression_count": 299,
      "visitor_with_impression_count": 267,
      "purchase_count": 1,
      "goal_count": 5,
      "conversion_rate": "0.00",
      "goals": [
        {
          "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
          "count": 100,
          "conversion_rate": "12.20"
        },
        {
          "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
          "count": 90,
          "conversion_rate": "11.05"
        }
      ],
      "currencies": [
        "EUR"
      ],
      "purchases_by_currency": [
        {
          "code": "EUR",
          "purchase_count": 9,
          "sales_value": "224.73",
          "avg_value_per_buyer": "24.96"
        }
      ]
    }
  ]
}

Aggregated total's per room in given time slot. Maximum allowed time range length is 180 days.

Attribute Type Description
conversion_rate string Calculated conversion rate percent (total_purchase_count/session_with_impression_count). The value is presented as a decimal string, e.g. 50.00
room_id ID Room ID for which the report was generated, e.g. b0a1d32b-e82c-11e4-b081-6c4008adf7e8
session_with_impression_count integer Count of sessions that have received impressions in given time range.
visitor_with_impression_count integer Count of unique daily visitors that have received impressions in given time range.
start_date string Start date of time range used to get the statistics. The value is ISO 8601 date string, e.g. 2016-01-01
end_date string End date of time range used to get the statistics. The value is ISO 8601 date string, e.g. 2016-01-30
total_goal_count integer Count of times that some goal was reached within 24 hours after some impression on given time range.
total_purchase_count integer Count of purchases within 24 hours after some impression on given time range.
total_impression_count integer Total count of impressions on time range.
goals array List of goal counts and conversions per goal ID
currencies array List of currency strings in ISO 4217 format
purchases_by_currency array Array containing sales per currency. See example on right and explanation of fields here
by_date array Array containing same fields as in the top level of the response json but by date. This is useful for example when drawing charts from data.

Retrieve room report for time range

Get aggregated totals of rules that have been triggered (impressions) in time range on given room (<room_id>).

GET https://api.giosg.com/api/reporting/v1/rooms/<room_id>/rules/daily/?start_date=<start_date>&end_date=<end_date>

Parameter Type Default Description
start_date string Required. Return statistics from this date on. ISO 8601 date string, e.g. 2016-01-01
end_date string Required. Return statistics until this date. ISO 8601 date string, e.g. 2016-01-01

Room rule report for single rule

An example request

1
GET https://api.giosg.com/api/reporting/v1/rooms/7c475838-eb59-11e5-890b-6c4008adf7e8/rules/1afa4f70-ec50-11e5-820d-6c4008adf7e8/daily/?start_date=2016-03-10&end_date=2016-03-25

An example response

  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
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
  "room_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
  "rule_id": "1afa4f70-ec50-11e5-820d-6c4008adf7e8",
  "start_date": "2016-05-05",
  "end_date": "2016-05-07",
  "total_impression_count": 874822,
  "session_with_impression_count": 606945,
  "visitor_with_impression_count": 306945,
  "total_goal_count": 95950,
  "total_purchase_count": 25950,
  "conversion_rate": "15.80",
  "goals": [
    {
      "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
      "count": 15000,
      "conversion_rate": "12.20"
    },
    {
      "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
      "count": 12200,
      "conversion_rate": "11.05"
    }
  ],
  "currencies": [
    "EUR",
    "USD",
    "GBP",
  ],
  "purchases_by_currency": [
    {
      "code": "EUR",
      "purchase_count": 95000,
      "sales_value": "23234.20",
      "avg_value_per_buyer": "2.45"
    },
    {
      "code": "USD",
      "purchase_count": 910,
      "sales_value": "9100.00",
      "avg_value_per_buyer": "10.00"
    },
    {
      "code": "GBP",
      "purchase_count": 50,
      "sales_value": "850.76",
      "avg_value_per_buyer": "17.01"
    }
  ],
  "by_date": [
    {
      "date": "2016-05-05",
      "impression_count": 1563,
      "session_with_impression_count": 122,
      "visitor_with_impression_count": 111,
      "purchase_count": 3,
      "goal_count": 9,
      "conversion_rate": "2.00",
      "goals": [
        {
          "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
          "count": 500,
          "conversion_rate": "12.20"
        },
        {
          "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
          "count": 453,
          "conversion_rate": "11.05"
        }
      ],
      "currencies": [
        "EUR",
        "USD"
      ],
      "purchases_by_currency": [
        {
          "code": "EUR",
          "purchase_count": 95000,
          "sales_value": "23234.20",
          "avg_value_per_buyer": "2.45"
        },
        {
          "code": "USD",
          "purchase_count": 910,
          "sales_value": "9100.00",
          "avg_value_per_buyer": "10.00"
        }
      ]
    },
    {
      "date": "2016-05-06",
      "impression_count": 1936,
      "session_with_impression_count": 299,
      "visitor_with_impression_count": 222,
      "purchase_count": 1,
      "goal_count": 9,
      "conversion_rate": "0.00",
      "goals": [
        {
          "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
          "count": 331,
          "conversion_rate": "12.20"
        },
        {
          "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
          "count": 292,
          "conversion_rate": "11.05"
        }
      ],
      "currencies": [
        "EUR",
        "GBP"
      ],
      "purchases_by_currency": [
        {
          "code": "EUR",
          "purchase_count": 95000,
          "sales_value": "23234.20",
          "avg_value_per_buyer": "2.45"
        },
        {
          "code": "GPB",
          "purchase_count": 910,
          "sales_value": "9100.00",
          "avg_value_per_buyer": "10.00"
        }
      ]
    },
    {
      "date": "2016-05-07",
      "impression_count": 1936,
      "session_with_impression_count": 299,
      "visitor_with_impression_count": 254,
      "purchase_count": 1,
      "goal_count": 9,
      "conversion_rate": "0.00",
      "goals": [
        {
          "goal_id": "b0a1d32b-e82c-11e4-b081-6c4008adf7e8",
          "count": 656,
          "conversion_rate": "12.20"
        },
        {
          "goal_id": "abc1d32b-e82c-11e4-b081-6c4008adf321",
          "count": 565,
          "conversion_rate": "11.05"
        }
      ],
      "currencies": [
        "EUR"
      ],
      "purchases_by_currency": [
        {
          "code": "EUR",
          "purchase_count": 9,
          "sales_value": "224.73",
          "avg_value_per_buyer": "24.96"
        }
      ]
    }
  ]
}

Aggregated total's of single Rule on room in given time slot.

Attribute Type Description
conversion_rate string Calculated conversion rate percent (total_purchase_count/session_with_impression_count). The value is presented as a decimal string, e.g. 50.00
room_id ID Room ID for which the report was generated, e.g. b0a1d32b-e82c-11e4-b081-6c4008adf7e8
rule_id ID Rule ID for which the report was generated, e.g. b0a1d32b-e82c-11e4-b081-6c4008adf7e8
session_with_impression_count integer Count of sessions that have received impressions in given time range.
visitor_with_impression_count integer Count of unique daily visitors that have received impressions in given time range.
start_date string Start date of time range used to get the statistics. The value is ISO 8601 date string, e.g. 2016-01-01
end_date string End date of time range used to get the statistics. The value is ISO 8601 date string, e.g. 2016-01-30
total_goal_count integer Count of times that goal was reached within 24 hours after some impression on given time range.
total_purchase_count integer Count of purchases within 24 hours after some impression on given time range.
total_impression_count integer Total count of impressions run on time range.
currencies array List of currency strings in ISO 4217 format
purchases_by_currency array Array containing sales per currency. See example on right and explanation of fields here
by_date array Array containing same data as in the top level of the response json but by date. This is useful for example when drawing charts from data.

Retrieve per rule report for room and time range

Get a aggregated total's of single rule (<rule_id>) that have run in time range on given room (<room_id>).

GET https://api.giosg.com/api/reporting/v1/rooms/<room_id>/rules/<rule_id>/daily/?start_date=<start_date>&end_date=<end_date>

Parameter Type Default Description
start_date string Required. Return statistics from this date on. ISO 8601 date string, e.g. 2016-01-01
end_date string Required. Return statistics until this date. ISO 8601 date string, e.g. 2016-01-01

Purchases by currency object

Purchase values will be shown per currency. Each rule reporting endpoint will return sales in purchases_by_currency array. Array will contain objects that have the currency code in code field. Each object represents sales in given currency.

Attribute Type Description
code  string Currency code in ISO 4217 format
purchase_count  integer Count of times shopping cart was purchased on given time range and with current currency
sales_value  string Sales value of carts. The value is presented as a decimal string, e.g. 5000.00
avg_value_per_buyer string Calculated average value per buyer. (sales_value/purchase_count). The value is presented as a decimal string, e.g. 45.00

Goal statistics object

This object contains information on a specific goal.

Attribute Type Description
goal_id ID  The ID of the goal
count integer How many goals in the scope were reached (total or per rule, depends on the context)
conversion_rate string  Calculated conversion rate percent (count/session_with_impression_count). The value is presented as a decimal string, e.g. 50.00