Skip to content

Configure products and send data

You can use orb() commands anywhere on your page after the snippet is installed. There are two main commands that you should use initially: config to configure properties, and track to send data.

Initialize products with config

Use the config command to initialize and configure settings for a particular account. The config command takes the following format:

orb('config', <script_token>, {<additional_config_info>});

where <script_token> is the Token of the script which belongs to your account, and the <additional_config_info> is an object used to specify additional configuration options and the only required attributes you need to supply are scope and namespace.

The config command enables you to specify which products and integrations the Web SDK should handle for your account. Depending on the configuration you've set on Orbee's Platform, additional behavior might be added to the Web SDK. For example, in some cases the config command can request a script that includes Dynamic Number Insertion (DNI) functionality, that will replace phone numbers on the website with Orbee's Call Trackers.

The most basic example consists is just the config command, the script_token, and a configuration object with scope and namespace provided:

orb("config", "SCRIPT_TOKEN", { scope: "SCOPE", namespace: "namespace1" });

Note

When using the entire snippet, the tms.js file will automatically configure your script token for you. The above config command is best used to:

- optimize network usage when using many script tokens.
- to override server-side configuration.
- to test out a development script token.

Send data with track

The track command is the easiest way to send event data. A token must be provided to send the event. For example, you can use the track command to send a view event to token "abc123" with an object value of "video" :

Your token value will be the script_token you wish to send the event to

orb("track", "view video", {
  action: "view",
  object: "video",
  token: "abc123",
});

All events should conform to Orbee's Event Specification (OES).

Debugging

To open Orbee's Web SDK Debugger, an entire application usable in a new window, you can use the following command:

orb("config", "debug", true);