Vygor

Website

Set up your website with Vygor

Add Vygor to your website using one of two approaches: Embed for a no-code drop-in widget, or the SDK for full programmatic control.

Embed

The embed is the fastest way to add Vygor to an existing site. Paste the snippet below before the closing </body> tag.

<script src="https://cdn.vygor.com/embed.js" data-key="YOUR_PUBLIC_KEY" async></script>

The widget will mount automatically once the script loads. You can customize its behavior using data- attributes:

AttributeDescription
data-keyYour public API key (required)
data-themelight or dark (default: light)
data-positionbottom-right, bottom-left (default: bottom-right)

SDK

Use the SDK when you need to trigger Vygor programmatically or integrate it into a React, Next.js, or other JS framework.

Install

npm install @vygor/sdk

Initialize

import { Vygor } from '@vygor/sdk';

const vygor = new Vygor({ apiKey: 'YOUR_PUBLIC_KEY' });

Usage

// Open the widget manually
vygor.open();

// Pre-fill user data
vygor.identify({ name: 'Jane Doe', email: 'jane@example.com' });

// Listen for events
vygor.on('complete', (data) => {
  console.log('Workflow complete', data);
});

On this page