GithubHelp home page GithubHelp logo

bard-rr / agent Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 60 KB

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

JavaScript 100.00%
agent javascript nodejs

agent's Introduction

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.

agent's People

Contributors

marcinkostecki avatar aahull08 avatar neenol avatar epofallon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.