Skip to content

Links Extension

The links extension enables events that track link clicks on the site. This extension provides ways to see what links it has detected, as well as support for parsing links for their label and URL.


This extension can be enabled through Orbee's Platform. If you are manually controlling installation and setup, you can also fetch the plugin here:

<script async src="" />

This standalone installation sets up the extension's class on the window object, under window.OaLinksExtension. You can then extend your scope like this:

oa.getScope(YOUR_SCOPE).extend('links', OaLinksExtension);


This extension requires no additional configuration at this time.


This extension has a variety of available attributes and functions to call.

This is an object of links the extension is currently tracking; the key is the generated ID for that link instance, and the value is the link element on the web page.

links.links = {
    "b92258ec-1b11-4b80-8111-729187e3c9f4": <a element-on-page>,


This is an object that uses a MutationObserver to track changes to your website, and continuously add tracking to new links. It is on by default; you can disable it with links.domWatcher.stop();.

If stopped, you can also restart it with;.


This function lets you manually enable tracking of a link on the web page. The DOM watcher automatically calls this method for all links it detects on your website.


This function lets you parse a link in the format our extension resolves things like the link's label as well as its destination URL. This function returns a proper link class that includes properties of the link.

Available methods/properties:

  • link.element: returns the element of the link.
  • returns the name of the link.
  • link.href: returns the destination URL of the link.


If you want to control when data is sent to Orbee, you can use the following methods to manually send link clicks to Orbee:


This function will track the click on a link. This does parse and send the name (label) and destination URL (href) of the link.


The extension generates the following events:

oa.track('link clicked', {
    _id: "<link instance id>",
    name: "linkName",
    href: ",


This extension does not listen for any events in the SDK.


This extension does not depend on any other extensions.