πŸ‘ΎSnippet

How to install Birdie snippet

circle-info

Birdie Snippet is required for capturing logs.

Birdie Snippet is required if you want to hide sensitive data.

1. Install Birdie snippet

You can choose between 2 options:

First option: Frontend Integration using NPM

npm install @birdie-so/snippet
# or
yarn add @birdie-so/snippet
chevron-rightUse with React / Vue / Angular / JShashtag

You must get your own clientId, get it from your Birdie settings > incomingarrow-up-right section.

import { initBirdie } from "@birdie-so/snippet";

initBirdie({
  clientId: "YOUR_CLIENT_ID", // required

  // Optional metadata available to recordings
  metadata: {
    user: {
      id: "123",
      email: "[email protected]",
    },
  },

  // Optional hook once Birdie is ready
  onReady(birdie) {
    birdie.on("start", (data) => {
      console.log("Recording started", data);
      birdie.metadata = { dynamicKey: "value" };
    });

    birdie.on("stop", (data) => {
      console.log("Recording stopped", data);
    });
  },
});

πŸ‘‰ You will find some more infos about implementation in this pagearrow-up-right.


Second option: Basic JavaScript

circle-info

We do not recommend installing Birdie through Google Tag Manager or Segment. The preferred method is to paste the code directly onto your web application, as this will result in faster load times.

  1. Copy the snippet code and paste it before the </body> tag of your web app. Note that the snippet is unique to your organization.

chevron-rightHow to add custom medatadahashtag

Optionally add your own metadata if you need to store additional data along the recordings like this:

πŸ’‘ Note that if you have several tabs open with the snippet loaded, only the latest metadata that was set will be available along a recording.

chevron-rightHow to hook into recorder eventshashtag

Optionally you can register for events to know when a recording has started and stopped. First make sure window.birdie object is present by registering for onBirdieReady event before loading the snippet, then register for "start" and "stop" events like this:


2. Whitelist Birdie in your Content Security Policy

To ensure proper functionality, whitelist the following:

  • HTTPS: https://*.birdie.so

  • Secure WebSocket protocol: wss://*.birdie.so

  • Port: 443, 3478 (TCP and UDP)

  • IP Address: 18.189.92.9 and 3.20.198.186

This will allow Birdie to function smoothly within your network environment.

chevron-rightHow to Send instructions to our developers?hashtag

If you don't have access to your codebase and need help with the installation, you can send the instructions to your developers directly for your settings pagearrow-up-right.

circle-check

Last updated