Skip to content
/ agent Public

Bardrr is a node.js package for recording browser events for the bard session replay and analysis tool.

Notifications You must be signed in to change notification settings

bard-rr/agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version Downloads/week License

Bardrr

Recording Agent for Bard

Bardrr is a node.js package for recording browser events for the Bard session replay and analysis tool.

Installation

This is a Node.js package available through the npm registry. Installation is done using the npm install command:

$ npm install bardrr

Initializing the Agent

In order to use the bardrr Agent to collect browser events, you must import the Agent from bardrr. Then in your app, you need to call the start method on an instance of the Agent, passing in an object with an appName, endpoint and MAX_IDLE_TIME.

  • appName is the name of the application you're recording.
  • endpoint is where the Agent will send the events.
  • MAX_IDLE_TIME is the amount of idle time (in milliseconds) after which a session ends. Example:
import Agent from "bardrr";

new Agent().start({
  appName: "Better Brew",
  endpoint: "http://www.betterbrew.com",
  MAX_IDLE_TIME: 60 * 1000,
});

Custom Events

Custom events allow Bard users to create queryable events from very specific user actions on their site. To trigger a custom event, you need to import the Agent and call the static handleCustomEvent method on it with a string as an argument. This string is the custom event's type, and is used to query the custom event in the Bard user interface.

import Agent from "bardrr";

Agent.handleCustomEvent("myCustomEvent");

Additional Configuration

Additional configuration is available through the recordOptions and recordConsolePlugin properties of the object exported by config.js, which are preset to reasonable defaults. Detailed documentation for recordOptions and recordConsolePlugin is available on the rrweb GitHub page, specifically here and here, respectively.

Website

You can read more about our project here.

About

Bardrr is a node.js package for recording browser events for the bard session replay and analysis tool.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •