.noConflict(): this#Methods
#Audit
#noConflict
If an
Audit object already exists in the global object of the current
page, the Audit.js library will be renamed to PooolAudit and the original
Audit object will be restored.#init
.init(appId: String): thisInitializes Audit using your app ID.
#sendEvent
.sendEvent(eventName: String, data?: Object, options?: AuditOptions): Promise<boolean>Sends an audit event.
#Available events
#page-view
#Options
#beacon
- Type: Boolean
- Default: false
Sends the event using the Beacon API (
navigator.sendBeacon) to avoid loosing
requests sent right before a redirect (like a click over a button).#config
.config(optionName: String, optionValue: Any, readOnly?: Boolean): this.config(options: Object, readOnly?: Boolean): thisAllows to set some configuration options. See the
configuration options documentation.
#on
.on(name: String, callback: Function): thisAllows to set a callback to be called when a specific event is triggered. See
the events documentation.
#once
.once(name: String, callback: Function): thisSame as
.on() but the callback will be called only once and removed afterwards.#off
.off(name: String, callback: Function): thisAllows to remove an event callback previously set with
.on() or .once().