Getting started

Install @livelike/embet and initialize the overlay.

Concept: Initialization

Installing

The emBET SDK can be installed using your favorite package manager or CDN.

npm install @livelike/embet
<script src="https://unpkg.com/@livelike/embet/dist/embet.umd.js"></script>
ℹ️

Versioning Recommendation

We strongly recommend always using a specific SDK version and upgrading manually when new versions are released.
Avoid using unpinned or “latest” versions, as automatic updates may introduce breaking changes or behavioral differences that can affect your application.


The HTML element embet-overlay needs to be added to your application in order for the SDK to be able to show the overlay within it. The element needs an attribute customid which represents your current event ID.

<embet-overlay customid="<your-event-id>"/>

To initialize the SDK, use the embet.init function. You must provide a Client ID as the clientId property in the function’s argument.

import embet from "@livelike/embet";

import {clientId} from './your-config'
 
embet.init({clientId}).then((profile) => {
  // This will generate a new profile
  console.log("Initialized");
});
ℹ️

Each new profile counts toward MAU. Reuse accessToken for returning users — see User profiles and Web user profiles.

Next steps