This is the most universal method for integrating the Emplorium chat widget into any standard HTML website.
Where to Find Your Snippet Code
- Log in to your Emplorium account.
- Navigate to Settings > For Developers > Installation Guide.
- Copy the provided JavaScript embed code.
Snippet Code (HTML)
<script type="text/JavaScript">
((function(){
var loadWidget = function(){
var script = "https://widget-service-dev.emplorium.io/acc-9700d/init.js";
var x = document.createElement('script');
var sx = document.getElementsByTagName('script')[0];
x.src = script; x.async = true;
sx.parentNode.insertBefore(x, sx);
fetch("https://auth-service-dev.emplorium.io/widget-init-status", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ accountID: "9700d" })
}).catch(function(error) {
console.error('Widget installation status update failed:', error);
});
}
if(document.readyState === "complete") {
loadWidget();
} else if (window.addEventListener){
window.addEventListener('load', loadWidget, false);
} else if (window.attachEvent){
window.attachEvent("onload", loadWidget);
}
})())
</script>
Placement
Paste this entire snippet just before the closing </head>
tag of your website’s HTML file. This ensures the widget loads asynchronously without blocking your page content.
React Integration
Option A: Embed Script in public/index.html
- Open your React project.
- Edit
public/index.html
and add the snippet above just before </head>
.
- Save and run your app (
npm start
).
- Confirm widget loads at
http://localhost:3000
.
Option B: Install Emplorium Choose your preferred package manager
Use in your component:
import { EmploriumWidget } from 'emplorium';
function App() {
return (
<div>
<h1>Your React App</h1>
<EmploriumWidget accountID="acc-9700d" />
</div>
);
}
export default App;
Angular Integration
Option A: Script Embed
- Modify
src/index.html
, insert widget snippet before </head>
.
- Run app with Angular CLI:
ng serve
.
- Verify widget at
http://localhost:4200
.
Option B: SDK Installation
npm install emplorium-angular
Usage:
import { EmploriumWidgetComponent } from 'emplorium-angular';
<emplorium-widget [accountID]="'acc-9700d'"></emplorium-widget>
Optional: ngsw-config.json
Example
{
"assetGroups": [
{
"name": "widget-assets",
"installMode": "lazy",
"resources": {
"urls": ["https://widget-service-dev.emplorium.io/*"]
}
}
]
}
Vue.js Integration
Option A: Embed Script
- Insert the widget script in
public/index.html
before </head>
.
- Run Vue CLI app:
npm run serve
.
- Verify widget loads at
http://localhost:8080
.
Option B: Install SDK
npm install emplorium-vue
Register in main.js
import { createApp } from 'vue';
import App from './App.vue';
import { EmploriumWidget } from 'emplorium-vue';
const app = createApp(App);
app.component('EmploriumWidget', EmploriumWidget);
app.mount('#app');
Usage in template:
<template>
<EmploriumWidget accountID="acc-9700d" />
</template>
Next.js Integration
Option A: Script File
- Create
public/EmploriumWidget.js
and paste widget script inside.
- In your
_app.js
or layout:
<Script src="/EmploriumWidget.js" strategy="beforeInteractive" />
Option B: SDK Installation
import { EmploriumWidget } from 'emplorium';
function App() {
return <EmploriumWidget accountID="acc-9700d" />;
}
For content management systems and no-code platforms, you’ll typically use the standard HTML snippet code and paste it into a designated “custom code” or “header script” section.
WordPress
- Install a plugin like “Insert Headers and Footers” (or similar, from the WordPress Plugin Directory)
- Go to
Settings → Insert Headers and Footers
in your WordPress admin dashboard.
- Paste the basic HTML snippet code into the “Scripts in Header” section
- Save your changes and reload your WordPress site to see the widget.
Shopify
- Navigate to Online Store → Themes → Edit Code.
- Edit
theme.liquid
.
- Insert widget script before
</head>
.
Webflow
- Go to Project Settings → Custom Code.
- Add the widget script to Head Code.
- Save and publish your site.
Wix
- Edit site → Add → Embed Code → Embed a Widget.
- Paste the widget script.
- Adjust position and publish.
Framer
- Open Framer and go to the Code tab.
- Add the widget script as a custom block.
- Save and publish your project.
Final Checklist for Successful Installation
Before concluding, double-check these common points to ensure your Emplorium widget is installed correctly:
- ✅ The Emplorium widget script is placed correctly: before
</head>
or </body>
depending on setup
- On the same page in emplorium’s integration settings, click the “Check Installation” button to check if emplorium detected the installation.
- ✅ Your unique Emplorium Account ID (
acc-9700d
in examples) is correctly inserted in the snippet or SDK component
- ✅ Ensure that any
fetch
status calls (if part of your snippet for reporting installation) are not being blocked by browser extensions or ad-blockers during testing (though this usually doesn’t affect widget functionality).
- ✅ Check your browser’s developer console for any JavaScript errors after loading the page with the widget.
Need Help?
If you encounter any issues during the installation process, don’t hesitate to:
- Contact Emplorium Support: Our team is ready to assist you.
- Consult Your Teammates: Share this guide with your development team for assistance.
Responses are generated using AI and may contain mistakes.