Add Oogla to Your Website
Install the Oogla AI widget on any website in under 5 minutes — no backend required. Choose your framework below and follow the step-by-step guide.
3-Step Quick Start
Get your AI agent live in minutes:
Before You Start
You'll need your Site ID and Company ID from the Oogla dashboard.
Log in to your Oogla Dashboard
Go to oogla.olamalabs.com and sign in to your account.
Navigate to Settings → Widget
In the sidebar, click Settings, then select the Widget tab.
Copy your IDs
You will see your Company ID and Site ID. Keep these handy — you'll paste them into the snippet below.
Add your website domain
Under Settings → Websites, add the domain(s) where the widget will run. This is required for the security check to pass.
Framework Guides
Select your framework to see the exact installation steps and code.
<!-- Paste before </body> in your HTML file --> <script src="https://oogla-api.olamalabs.com/widget.js" data-company-id="YOUR_COMPANY_ID" data-site-id="YOUR_SITE_ID" data-api-url="https://oogla-api.olamalabs.com" defer> </script>
Configuration Reference
All options can be passed as data-* attributes on the script tag (for HTML / Pages Router) or as properties on window.ooglaSettings (for App Router and programmatic installs).
| Attribute / Key | Required | Description | Default |
|---|---|---|---|
data-site-id / siteId | Required | Your unique site identifier. Found in Dashboard → Settings → Widget. | — |
data-company-id / companyId | Required | Your company/workspace identifier. Found in Dashboard → Settings → Widget. | — |
data-api-url / apiUrl | Optional | API base URL. Defaults to https://oogla-api.olamalabs.com — only change if self-hosting. | https://oogla-api.olamalabs.com |
data-position / position | Optional | Widget launcher position on screen. Options: bottom-right, bottom-left | bottom-right |
data-theme / theme | Optional | Colour theme of the widget UI. Options: dark, light | dark |
data-color / color | Optional | Primary accent color (any valid hex or CSS color). | #7c3aed |
data-welcome-message / welcomeMessage | Optional | Override the AI agent's opening greeting message. | Set in dashboard |
Using window.ooglaSettings (all frameworks)
window.ooglaSettings = {
siteId: "YOUR_SITE_ID", // required
companyId: "YOUR_COMPANY_ID", // required
apiUrl: "https://oogla-api.olamalabs.com", // optional
position: "bottom-right", // optional
theme: "dark", // optional: "dark" | "light"
color: "#7c3aed", // optional: any hex color
welcomeMessage: "Hey! How can I help?", // optional
};Troubleshooting
Advanced Usage
Conditional Loading (authenticated pages only)
If you only want the widget on public pages and not the admin/dashboard:
// Only load widget when NOT on dashboard routes
const isDashboard = typeof window !== 'undefined' &&
window.location.pathname.startsWith('/dashboard');
if (!isDashboard) {
window.ooglaSettings = {
siteId: 'YOUR_SITE_ID',
companyId: 'YOUR_COMPANY_ID',
apiUrl: 'https://oogla-api.olamalabs.com',
};
// load script...
}Multiple Sites / Domains
siteId for each deployment.Custom Welcome Message per Page
// Set before the widget script runs, or update after load
window.ooglaSettings = {
siteId: 'YOUR_SITE_ID',
companyId: 'YOUR_COMPANY_ID',
apiUrl: 'https://oogla-api.olamalabs.com',
welcomeMessage: "Welcome to our pricing page! Need help choosing a plan?",
};Verifying Installation
After deploying, open your browser Console (F12) and run:
// Should print your settings object
console.log(window.ooglaSettings);
// Should return the oogla-widget-root div
console.log(document.getElementById('oogla-widget-root'));document.getElementById('oogla-widget-root') returns an element, the widget has mounted successfully. You should see the floating launcher button on your page.