Keep'emKeep'em
Embedding

Widget Setup

This guide covers the technical integration of the Keep'em widget into your application.

Adding the Script

Include the Keep'em widget script on any page where you want the video to appear:

<script src="https://widget.getkeepem.com/v1/widget.js"></script>

Configuration

Initialize the widget with your project's publishable key and the viewer's identity:

<script>
  Keepem.init({
    publishableKey: 'pk_live_your_key_here',
    eventId: 'evt_your_event_id',
    viewer: {
      email: 'viewer@example.com',
      name: 'Jane Doe',
      externalId: 'your_internal_user_id'
    }
  });
</script>

The viewer object identifies who is watching. The externalId is your internal user identifier — it links the viewer's Keep'em registration to their account in your system.

For the most reliable integration, register viewers from your backend when they create an account:

curl -X POST https://api.getkeepem.com/v1/events/{eventId}/registrations \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "viewer@example.com",
    "name": "Jane Doe",
    "externalId": "your_internal_user_id"
  }'

This ensures the viewer is registered before the widget ever loads.

Just-in-Time Registration

Alternatively, the widget can handle registration automatically. When it loads and finds no existing registration for the provided email, it creates one. This is simpler to implement but means registration happens on the client side.