Skip to content

Tracking with the Web SDK

The Web SDK provides multiple ways to track interactions with your website. You can do this externally from the SDK or integrated with it. The Web SDK also provides tracking solutions out-of-the-box for many standardized interactions in the browser, like clicks, time tracking, and forms.

Standard interactions

By default, the Web SDK provides a set of tracking capabilities to track the visits and pageviews of your visitors. It offers the following plugins and capabilities:

Plugin Capabilities Docs
Activity tracking Track time spent on page, and general stats like scroll depth, click count, and more.
Click tracking Track clicks in content and clickable elements.
Event-syncing Track between frames and pages and sync activity from IFrames to your main site visitors.
Form tracking Track form interactions, abandonment, and completion.
Orbee analytics Take all events sent through the Events SDK module and send them to Orbee's Collector.

Custom Interactions

If you want to track custom events you have a few options, depending on how integrated into the Web SDK you'd like to get.

Events SDK module

Using the Events SDK module in a plugin, you can send data to Orbee:

namespace.events().track(action, event_spec_object);

These events are sent to Orbee's backend, interpreted, and processed into reporting data. This feature has you integrated into Orbee's Web SDK, so your data will have full access to all of Orbee's products and services.

Through the orb command queue

An easier approach to push events and data to Orbee is by using the track command. This command provides a unique label (the event_label parameter), as well as an event spec object:

orb("track", event_label, event_spec_object);

WARNING

For older versions of the Web SDK, this command used to be the `hook` command:

orb('hook', hook_label, event_spec_object);

Using this feature alllows you to push data to Orbee; however, it does not let you take advantage of Orbee's products and services -- it's a completely decoupled approach.