Docs · SDK · Vanilla JS

Install Brevwick in Vanilla JS.

Copy-paste the snippets below. Replace pk_test_demo with the public key from your project — find it under Project settings → Keys.

1. Install

Install the adapter alongside the core SDK.

npm install @tatlacas/brevwick-sdk

2. Wire the SDK

src/brevwick.tsTypeScript

import { createBrevwick } from '@tatlacas/brevwick-sdk';

const bw = createBrevwick({
  projectKey: 'pk_test_demo',
});

bw.install();

document.querySelector('#feedback-button')?.addEventListener('click', async () => {
  const result = await bw.submit({
    description: 'Triggered from a custom control',
  });
  if (!result.ok) {
    console.error(result.error.code, result.error.message);
  }
});

index.htmlHTML

<script type="module">
  import { createBrevwick } from 'https://esm.sh/@tatlacas/brevwick-sdk';

  const bw = createBrevwick({ projectKey: 'pk_test_demo' });
  bw.install();
</script>

Verify

  • Open the app in a browser.
  • Trigger the custom feedback handler.
  • Confirm the issue lands in /app/issues.

Full guide: /docs/sdk/vanilla

Browse the registry for version history, source, and download counts.