JavaScript SDK Settings

Introduction

The JavaScript SDK, called uDash, allows to specify multiple options in its uDash.init method to control its behaviour, most importantly:

You can set different options for different pages to which you add the tracking code.

Specifying Settings

The options object is passed as a parameter to the uDash.init method which is executed in the tracking code. By default, it contains just obligatory parameters identifying your project.

uDash.init({ 
   uProjectName: 'my-project',
   uProjectApiPass: 'ec4cfa1ff9680d8fafb546ea54ef8cf2',
   uPort: 12345
});

To set an option, list of which you can find below, add them in the object, for example:

uDash.init({ 
   uProjectName: 'my-project',
   uProjectApiPass: 'ec4cfa1ff9680d8fafb546ea54ef8cf2',
   uPort: 12345,
   uRecordInteractiveEvents: false
});

Options Related to Tracking of Visits

Options Related to Tracking of (M) Section events

Options Related to Tracking of (M) Action events

Options Related to Tracking of (E) Interactive Events

Options Related to Tracking of Changes to Page Content for Session Replays

Options Related to Triggers

Options Related to Sending Data to Servers

Hooks for Event Handlers

You can specify a function which will be executed when the tracking code completes a certain task just like you specify other settings.

The example below disables automatic tracking of Section events based on URL and instead tracks a custom Section value “Contact Page”.

uDash.init({ 
   uProjectName: 'my-project',
   uProjectApiPass: 'ec4cfa1ff9680d8fafb546ea54ef8cf2',
   uPort: 12345,
   uRecordUrlChange: false,
   onReady: function(){ uDash.saveMeta('Section', 'Contact Page'); }
});