openreplay/tracker/tracker
Delirium 39f8602c76
feat(ui): intelligent search (#1881)
* feat(ui): start ai summary UI

* feat(ui): add api

* feat(ui): rm console log

* feat(ui): style fix

* feat(ui): some ui changes

* feat(ui): some ui changes

* feat(ui): some text formatting

* feat(ui): ai search stuff

* fix(ui): add int search ui

* feat(ui): map llm response to OR filters

* fix(ui): remove log

* fix
2024-03-18 11:12:01 +01:00
..
scripts feat(tracker): linting hook for tracker 2022-07-25 12:21:06 +02:00
src feat(ui): intelligent search (#1881) 2024-03-18 11:12:01 +01:00
.eslintignore change(tracker): unit tests for tracker 2023-02-06 12:42:18 +01:00
.eslintrc.cjs chore(tracker): update rollup, setup nvmrc conf 2023-10-23 13:18:34 +02:00
.gitignore feat(tracker): export test coverage for tracker 2023-05-31 11:41:40 +02:00
.npmignore Chore(release): v1.7.0 (#578) 2022-07-07 18:44:43 +02:00
.nvmrc chore(tracker): update rollup, setup nvmrc conf 2023-10-23 13:18:34 +02:00
.prettierignore Message protocol update (message size) (#663) 2022-08-22 12:32:48 +02:00
.prettierrc.json Message protocol update (message size) (#663) 2022-08-22 12:32:48 +02:00
bun.lockb fix(tracker): update fflate and changelogs (#1956) 2024-03-14 14:48:13 +01:00
CHANGELOG.md fix(tracker): update fflate and changelogs (#1956) 2024-03-14 14:48:13 +01:00
jest.config.js fix(tracker): fix test conf 2023-05-31 12:04:11 +02:00
js_errors.txt feat: tracker init 2021-05-03 13:31:55 +02:00
LICENSE MIT license for OpenReplay protocol 2022-08-30 19:04:32 +02:00
package.json fix(tracker): update fflate and changelogs (#1956) 2024-03-14 14:48:13 +01:00
README.md feat(tracker): safety wrap for angular, new performance/lag display system 2023-10-25 12:29:42 +02:00
rollup.config.js chore(tracker): update rollup, setup nvmrc conf 2023-10-23 13:18:34 +02:00
tsconfig-base.json fix(tracker): update target module in tsconfig, add moduleInterop for test runner 2024-01-09 14:16:19 +01:00

OpenReplay Tracker

The main package of the OpenReplay tracker.

Development & Contribution

Please use bun to install and build this library. Any submitted pull request must pass all tests and should have positive test coverage diff %.

Documentation

For launch options and available public methods, refer to the documentation

Installation

npm i @openreplay/tracker

Usage

Initialize the package from your codebase entry point and start the tracker. You must set the projectKey option in the constructor. Its value can can be found in your OpenReplay dashboard under Preferences -> Projects.

import Tracker from '@openreplay/tracker'

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
})
tracker
  .start({
    userID: 'Mr.Smith',
    metadata: {
      version: '3.5.0',
      balance: '10M',
      role: 'admin',
    },
  })
  .then((startedSession) => {
    if (startedSession.success) {
      console.log(startedSession)
    }
  })

Then you can use OpenReplay JavaScript API anywhere in your code.

tracker.setUserID('my_user_id')
tracker.setMetadata('env', 'prod')