Quick start

Get Trovi running in under 2 minutes.

Installation

npm install @trovi/sdk

Browser setup

Add two lines to your app entry point:

import { init } from '@trovi/sdk/browser'

init({
  apiKey:       'your-api-key',
  dashboardUrl: 'https://your-trovi.example.com',
  environment:  'production',
})

That's it. Trovi now automatically captures:

  • JavaScript errors and unhandled promise rejections
  • Network failures and slow requests (>2s)
  • Console errors and warnings
  • Memory leaks
  • Core Web Vitals (LCP, CLS, INP)
  • Security issues (mixed content, dangerous localStorage usage)

Node.js / Express setup

import { init, troviMiddleware } from '@trovi/sdk/node'

init({
  apiKey:       'your-api-key',
  dashboardUrl: 'https://your-trovi.example.com',
  environment:  'production',
})

// Add after body-parser, before your routes
app.use(troviMiddleware())

Verifying it works

Open your Trovi dashboard and check the Events page.

You should see events appearing within 10 seconds of your

app loading.

Run the built-in diagnostics to confirm connectivity:

import { logDiagnostics } from '@trovi/sdk/browser'
await logDiagnostics()