Summary
The /error endpoint is designed to return data on JavaScript and general errors as well as CSP Violations. All requests to this endpoint must be HTTP POST.
Endpoint URL
https://api.bluetriangletech.com/error
Example Request
{"site":"demosports","start":1691006361,
"end":1691092761,"reportQueue":false,"dataType":"synthetic",
"dataColumns":["errorCount"],"group":["time","errorConstructor"],
"order":"time","sort":"asc","limit":50000,"configID":["1684754601",1],
"percentile":80,"performanceMetric":"onload","salesType":"sales",
"avgType":"arithmetic","calendarType":"calendar","notAllPages":true,
"tzOffset":"-4","useGeniusCache":false}
Example Response
[
{
"time": "1691002800000",
"errorConstructor": "CSP Violation",
"errorCount": "8"
},
{
"time": "1691002800000",
"errorConstructor": "Other",
"errorCount": "136"
},
{
"time": "1691006400000",
"errorConstructor": "TypeError",
"errorCount": "17931"
},
...]
Required Parameters
|
Name |
Type |
Description |
Options/Constraints |
|---|---|---|---|
|
site |
string |
Site the data is being pulled from. Uses the unique ID associated with your tag. |
None |
|
start |
integer |
Start time of the data in epoch time. |
epoch (seconds) |
|
end |
integer |
End time of the data in epoch time. |
epoch (seconds) |
|
dataColumns |
array |
The data columns to be retrieved. |
Options and descriptions listed below. |
Optional Parameters
Data Filtering
|
Name |
Type |
Description |
Options/Constraints |
|---|---|---|---|
|
group |
array |
If grouping by time, bucketSize will be available. |
Limited to 3 columns. |
|
hits |
boolean or string |
If set to true, the dataset will return individual rows of data instead of grouping the data. Defaults to false. |
|
|
pageName |
array |
Filters data by page name. |
|
|
pageGroup |
array |
Filters data by page group. |
|
|
trafficSeg |
array |
Filters data by traffic segment. |
|
|
browser |
array |
Filters data by browser. |
|
|
device |
array |
Filters data by device. |
|
|
os |
array |
Filters data by operating system. |
|
|
country |
array |
Filters data by country. |
ISO 3166 format |
|
region |
array |
Filters data by region. http://www.maxmind.com/download/geoip/misc/region_codes.csv |
ISO 3166 format with region ID numbers |
|
netspeed |
array |
Filters data by netspeed. |
|
|
campaignSource |
array |
Filters data by traffic source. |
|
|
campaignName |
array |
Filters data by the campaign name. |
|
|
campaignMedium |
array |
Filters data by traffic medium. |
|
|
abSegment |
array |
Filters data by an A/B segment. |
|
|
datacenter |
array |
Filters data by data center. |
|
|
botTraffic |
string |
Filters data by different types of bot traffic. Bots are excluded by default. |
|
|
visitorType |
array |
Filters data by return visitors or new visitors. Defaults to include both. |
|
|
domain |
array |
Filters data by domain. (e.g. the ‘bluetriangle.com’ part of www.bluetriangle.com) |
|
|
file |
array |
Filters data by resource. |
|
|
host |
array |
Filters data by host. (e.g. the ‘www’ part of www.bluetriangle.com) |
|
|
minSample |
integer or string |
Limits the data returned by sample size. |
|
|
avgType |
string |
The statistical method used for calculations. |
|
|
percentile |
integer |
The value used to determine the percentile distribution.
|
|
|
dataType |
string |
If data is native app, RUM, or synthetic. Defaults to “rum”. |
|
|
bucketSize |
string |
Whether to group the data by minute, hour, or day. Only available if grouping by ‘time’. Minute bucket is available for time periods less than 6 hours. Hour bucket is available for less than 14 days. Day bucket is available for greater than 2 days. |
|
|
bucketValue |
integer or string |
Determines the size of the bucket size. For example, if “bucketSize” is set to minute and “bucketValue” is set to 15, the data will return in 15 minute increments. |
|
|
order |
string or array |
Orders the data by column. If used as an array, the “sort” parameter must be in the same order as the “order”. For example:
|
|
|
sort |
string or array |
Indicates whether the data is sorted by ascending or descending. |
|
|
limit |
integer |
Limits the number of rows returned. |
Max of 5,000 rows. |
|
page |
integer |
Which page currently being viewed if the rows of data pass the limit. |
|
|
sessionID |
array |
RUM or Synthetic session ID. |
Must be a valid session ID. |
|
customCategory(1-5) |
array |
Configurable category for data collection use. |
Needs to be configured in Site Configuration |
Response Formatting
|
Key |
Type |
Description |
Value/Constraints |
|---|---|---|---|
|
limit |
integer |
Limits the number of rows returned. |
Max of 50,000 rows. |
|
page |
integer |
Which page currently being viewed if the rows of data pass the limit. |
|
|
order |
string or array |
Orders the data by column. If used as an array, the "sort” parameter must be in the same order as the “order”. For example:
|
|
|
sort |
string or array |
Indicates whether the data is sorted by ascending or descending. |
|
Data Column Definitions
|
Data Column Option |
Description |
|---|---|
|
errorCount |
Total number of errors |
|
errorTime* |
The epoch time of the error |
|
lineNumber* |
The line of the error. Note: This may return 1 for minified files. |
|
errorMessage* |
The message produced when the error occurred. |
|
errorConstructor* |
The type of error that occurred. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error for more detail. |
*Only available if “hits” is set to true.