Client Side API

The functions are available on the client side in JavaScript to allow extending the default behaviour of Altis Accelerate beyond recording page views.

Setup Functions

Altis.Analytics.onReady( callback <function> )

Use this function to ensure analytics has loaded before making calls to Altis.Analytics.registerAttribute() or Altis.Analytics.record() for example.

Tracking Functions

Altis.Analytics.record( eventType <string> [, data <object>] )

Records an event of eventType. This can be any string. The optional data passed in should be an object with either or both an attributes object and metrics object:

{
  attributes: {
    name: 'value' // <string>
    // ...
  },
  metrics: {
    name: 1 // <number>
    // ...
  },
}

Those attributes and metrics can be later used in custom queries.

Endpoint Functions

In Altis Accelerate an “Endpoint” refers to a visitor’s browser or device they are using to access your website.