Allusion JS

Allusion JS

  • Docs

›Jump-in

Jump-in

  • Getting Started
  • Installation
  • API Reference

API Reference

Setup options

While calling init or importing standalone build of Allusion JS make sure you have properly configured setup options.

We currently support only one setup option:

OptionTypeDescriptionRequired
trackingUrlstringEndpoint to push payload to, this should to any logging and alert management platforms like ELK, splunk, cloudwatch or your company's inhouse solution. Request method to this URL would be POSTtrue

The Payload

The payload which trackingUrl will receive.

PropertyTypeDescription
global_user_idstringAllusion assigns user an ID and saves it in form of cookie, when user returns the webpage, we identify its the same user using cookie value.
global_visit_idstringAllusion assigns each user's visit an ID. You can search your logs using this ID. You may get multiple entries in your log for the same visit ID since Allusion will send this payload for each error. Each payload will contain event details (like click, XHR sent and all) occured before the error. Once and event is sent it wont be sent again. Number of payloads sent from the page would be equal to the errors encountered on the page.
urlstringURL of the page where Allusion reported error.
visited_atstringtimestamp when user visited the page (UTC).
events[]EventThis will be a array of event objects. Checkout Event object.

The Event object.

PropertyTypeDescription
event_typeEnumevent type occurred on the page. Checkout EventType enum.
visit_timestampNumberseconds till the visited_at.
event_dataEventDataevent related data goes in to this object. Checkout EventData object.

The EventType enum.

Event NameDescription
clickUser clicked an element on the page
changeInput change event
loadDOM load event
promiseRejectionEventany promise rejection event
xhrSentxhr was sent event

The EventData object.

PropertyTypeDescription
srcElementstringtarget element which caused this error. In case of click target element would be the element which was clicked. It may come for click and change events.
stackstringcall stack for the error. It may come for error or promiseRejectionEvent.
event_dataEventDataevent related data goes in to this object. Checkout EventData object.
urlstringURL of the xhr, it may only come for xhrSent event
methodstringHTTP method of the xhr, it may only come for xhrSent event
responseTextEventDataresponse as a text of the xhr, it may only come for xhrSent event
statusNumberresponse status of the xhr, it may only come for xhrSent event
← Installation
  • Setup options
  • The Payload
  • The Event object.
  • The EventType enum.
  • The EventData object.
Allusion JS | C S Madhav | made with ❤️ in India
Icons made by Freepik from www.flaticon.com