🧩Embed
Root your Spot at the core of your services by hosting your Spot directly on your website or application.


To embed your Spot into a page of a website or application, you'll need to add the script we provide to your HTML code. As the script is a dynamic SDK, it will take into account all future developments 😉
Implementation
Go to the Embed tab in your Spot settings.

Add your base URL
Enter the URL of the page where you plan to integrate your Spot in a https:// format. The URL must be the one of the exact page, not just the domain.
Add the first script to your code header
Copy the script and paste it into the <head> section of your page.

Add the second script to your page body
Copy the script shown and paste it into a section in the <body> of your page.
You may need to edit 2 elements of this script to style your frame:
Your frame size. By default, your frame entirely fills its parent element due to the setting
style="width:100%;height:100%". You can change this setting, but we recommend you edit the size of its parent element.Appearance mode (light or dark theme). By default,
themeModeis set to the valueAuto. You can change it to one of the following options:
auto
The user's system mode, unless they specify it otherwise in their profile settings.
system
The user's system mode.
light
All users will be in light mode.
dark
All users will be in dark mode.
💡 You can also add a deeplink parameter to the script to specify which page is shown to users who display your Spot in embed.
For example, adding deeplink: '/lives' to the script will take users to the Lives page rather than the homepage!
Activate embed
Once you have entered a valid base URL and injected the 2 scripts into your code, click on the activation button. Congratulations, your Spot is now embedded into your page 🎉
As long as you don't activate the embed, users will be able to see the inactive frame and will be redirected to your standalone Spot.
Implications
Member registration and login
Whenever embed is enabled, users can still access your Spot on https://go.meltingspot.io/spot/${spotId}. Users can sign up and log in from both versions.
Before embedding your Spot into a website or app that already has a logged-in space, we recommend you set up SSO. Your users will keep the same login credentials to navigate between your product and your embedded Spot.
🔑Single Sign-OnNavigating the embed
In your Spot in embed, the side navigation bar disappears and a unique horizontal navigation bar allows you to switch sections and manage your Spot and profile.

In embed, you can create new lives, documents, discussions, and member invitations from any section of your Spot. Click on the + button in the top right-hand corner to open the resource creation menu.
Customizing embed
We recommend you customize your Spot's theme for seamless navigation between your product and your Spot. See the following section to learn more about customizing your Spot's colors and fonts:
✨ThemeSharing URLs
Should you share the URL of the page in which your Spot is embedded, users would access the home page of your Spot in embed (or to the next section when the home page is deactivated).
If you want to share the URL of a specific location within your embed, use the share buttons: when clicking on such buttons, the URL of your location is copied to your clipboard.

You can find the share button:
In the Admin toolbar, at the top right of each of your sections. The URL copied is the one of the page you're on, e.g. a specific chat channel.
In the top right-hand corner of each Live card you hover your mouse over. The copied URL links to the Live Room.
Top right of every forum Topic card you mouse over; and inside the Topic.
Top right of each Collection page hovered over by your mouse; and inside the page.
Redirection settings
You can choose where your members will be redirected from a MeltingSpot notification e-mail (invitation to the Spot or to a Live, new message received...). Depending on your choice of redirection, they will either access your Spot on https://go.meltingspot.io/spot/{spotId} or in embed.
From the embed tab in your Spot settings, choose your redirection settings:

Choose one of the 3 following options:
No redirection: your members will always be directed to
https://go.meltingspot.io/spot/{spotId}. It is the default option.SSO users only: users who have already authenticated at least once via JWT SSO will be redirected to your Spot in embed. Other users will be directed to
https://go.meltingspot.io/spot/{spotId}.
All users: all your members will be redirected to your Spot in embed.
Multi-domains
You can embed your Spot into different domains. For instance:
In your product and in your website.
In a product that offers different access URLs depending on the user (
company1.acme.com;company2.acme.com; etc.).
Implementation is the same as for one domain - you will need to install the script on your different pages.
Only redirection will be impacted: if you activate an All users or SSO users only redirection, you can declare for each member the embed URLs they should be redirected to. Each URL is identified by a key: the default key, used in particular for notification emails, and custom keys that you name freely.
Declare a member's URLs: through the
domainsparameter of the JWT token (merged at each SSO login), or through theembedBaseUrlsfield of the API (full replacement).Choose the key to use: through the
domainparameter of a widget, embed or Coach script.
Multi-domains redirection
In the embed settings, if redirection is enabled (All users or SSO users only), each member to be redirected is sent to the first available URL among:
Their URL for the
domainkey set in the widget, embed or Coach script, if you specified one.Their URL for the
defaultkey, if you provided one.The
base URLset in the Spot's embed settings.
If you choose not to redirect users in the embed settings, they will be redirected to go.meltingspot.io/spot/yourSpotId , even if you have provided us with URLs for these users!
👉 Key and URL format, JWT and API examples, full algorithm and short links: Multi-domains and member redirection.
Mis à jour
Ce contenu vous a-t-il été utile ?