Skip to main content
Learn how to integrate Entri into any web application using plain JavaScript, without frameworks or build tools.
This guide uses showUnify(), the single entry point that lets your users connect a domain they own or buy a new one. If you only need one path, swap it for connectDomain() or purchaseDomain() in any example below; they take the same config. connectDomain() was previously named showEntri(), which is deprecated but still works as an alias.

Prerequisites

  • Your applicationId from the Entri dashboard
  • A valid JWT token fetched from your server
  • Basic understanding of JavaScript and DOM events

Installation

Add the Entri SDK to your HTML page:
The SDK will be available globally as window.entri.

Quick Start

A minimal working example to get started quickly:

Full Implementation

Step 1: Create an Entri Manager

Encapsulate all Entri logic in a reusable module for cleaner code.

Step 2: Use in Your Application

Event Handling

Entri emits several events during the flow. Set up listeners before calling showUnify().

onEntriPathSelected

Triggered when the user chooses between buying a new domain and connecting an existing one. After this point, the chosen flow fires its regular events. See Unify events.

onSuccess

Triggered when the user successfully completes domain setup (reaches the Congratulations screen).

onEntriClose

Triggered when the modal is closed, whether successful or not.

onEntriStepChange

Triggered when the user moves between screens in the modal. Useful for analytics.

onEntriManualSetupDocumentationClick

Triggered when the user clicks the manual setup guide link.

Common Patterns

Loading State UI

Error Display

Check Domain Before Opening

Use checkDomain to verify provider support before showing the modal:

Multiple DNS Records

Configure multiple records for complex setups:

Troubleshooting

Event listeners not firing

Make sure you’re adding listeners before calling showUnify():

SDK not loaded

Check that the script has loaded before using it:
Or wait for the script to load:

Multiple event handlers firing

If you’re dynamically adding/removing elements, make sure to clean up event listeners:

Next Steps