Home Reference Source
import Analytics from '~/models/Analytics.js'
public class | source

Analytics

Analytics wrapper

Constructor Summary

Public Constructor
public

The object to create from which.

Method Summary

Public Methods
public

report(eventName: string, eventType: EventType, label: string, id: number)

Reports an event of type

public

reportError(level: string, error: Error | AnyError, opts: Object)

Reports an error

public

reportTime(timingTime: TimingType, id: number)

Reports a time of sorts

Public Constructors

public constructor(obj: Object) source

The object to create from which. Returns null if invalid

Params:

NameTypeAttributeDescription
obj Object

Generally gtag

Public Methods

public report(eventName: string, eventType: EventType, label: string, id: number) source

Reports an event of type

Params:

NameTypeAttributeDescription
eventName string

An additional descriptor name

eventType EventType

An EventType symbol

label string
  • nullable: true

a string describing event

id number
  • nullable: true

unique number

public reportError(level: string, error: Error | AnyError, opts: Object) source

Reports an error

Params:

NameTypeAttributeDescription
level string

error or warning

error Error | AnyError
opts Object

Additional options

opts.critical boolean
  • optional
  • default: false

If the error is critical to app

public reportTime(timingTime: TimingType, id: number) source

Reports a time of sorts

Params:

NameTypeAttributeDescription
timingTime TimingType

An TimingType symbol

id number

time in MS