Quickstart
Add the Ekoo widget to your site in just a few minutes
data-ekooReqdata-ekoo-product-idReqdata-ekoo-localeautodata-ekoo-variantdata-ekoo-review-iddata-ekoo-on-eventdata-ekoo-directionnormaldata-ekoo-scale1data-ekoo-animationpulsedata-ekoo-animation-durationcontinuousdata-ekoo-always-openfalsedata-ekoo-show-imagetruedata-ekoo-not-fully-clickablefalsedata-ekoo-autoplayfalsedata-ekoo-show-transcriptfalsedata-ekoo-show-speed-buttonfalsedata-ekoo-closed-state-main-textdata-ekoo-closed-state-secondary-textdata-ekoo-modeautodata-shadow-modeopenwindow.EKOO_FORCE_SPA = truewindow.ekooShadowMode = "open"1. Minimal Code
Add these two elements to your page: a container with the data-ekoo attributes and the official script.
1<!-- Widget container -->2<ekoo-widget3 data-ekoo="YOUR_WEBSITE_ID"4 data-ekoo-product-id="YOUR_PRODUCT_ID"5 data-ekoo-locale="fr"6></ekoo-widget>78<!-- Ekoo script (load once) -->9<script src="https://app.ekoo.co/widgets/widget-4.0.0-standalone.js"</script>Published audio required
The widget only appears if at least one audio is published for the product-id specified. Check the status in the Ekoo backoffice.
2. Attribute Details
Container Attributes
| Attribute | Required | Description |
|---|---|---|
data-ekoo | Required | Marks the element as an Ekoo widget container. |
data-ekoo-product-id | Required | Product identifier. Must match the ID configured in the backoffice. |
data-ekoo-locale | Optional | Widget language (fr, en, auto…). Defaults to automatic detection. |
data-ekoo-type | Optional | Widget type: standalone (default). Can be omitted. |
data-ekoo-variant | Optional | Reference of a widget configuration saved in the backoffice (e.g. "homepage"). Picks the styling to apply; product and audios still come from data-ekoo-product-id. |
data-ekoo-on-event | Optional | Name of a global function called on widget events (played-0, played-25, etc.). |
Script Attributes
| Attribute | Required | Description |
|---|---|---|
src | Required | Always https://app.ekoo.co/widgets/widget-4.0.0-standalone.js |
defer | Recommended | Loads the script without blocking page rendering. |
Multilingual sites
Use data-ekoo-locale="auto" to let the widget automatically adapt to your visitors' browser language.
3. Complete Example
1<!DOCTYPE html>2<html lang="fr">3<head>4 <meta charset="UTF-8" />5 <title>Mon produit</title>6</head>7<body>89 <h1>Mon super produit</h1>1011 <!-- Ekoo Widget -->12 <ekoo-widget13 data-ekoo="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"14 data-ekoo-product-id="my-product-123"15 data-ekoo-locale="fr"16 ></ekoo-widget>1718 <!-- Ekoo Script -->19 <script src="https://app.ekoo.co/widgets/widget-4.0.0-standalone.js"</script>2021</body>22</html>4. JavaScript Configuration
You can also configure widgets via window.ekooOptions instead of HTML attributes. This is useful for SPA applications or when you need to manage multiple widgets dynamically.
1<!-- Target container -->2<div id="ekoo-container"></div>34<script>5 window.ekooOptions = {6 websiteId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",7 widgets: [8 {9 nodeId: "ekoo-container",10 productId: "my-product-123",11 locale: "fr"12 }13 ]14 };15</script>1617<script src="https://app.ekoo.co/widgets/widget-4.0.0-standalone.js"</script>If the Widget Does Not Appear
- Verify that the audio is published in the backoffice.
- Verify that the
data-ekoo-product-idmatches the product identifier in the backoffice. - Verify that the
data-ekoois correct (site UUID). - Make sure the
widget-4.0.0-standalone.jsscript is loaded (check the Network tab in DevTools). - Check for JavaScript errors in the console.
- If you are using an ad blocker, temporarily disable it.
- Make sure the
data-ekoocontainer is present in the DOM when the script loads.
Note
If the issue persists, contact Ekoo support with your Website ID and the affected Product ID.
5. Custom Element Alternative
Instead of a <div>, you can use the <ekoo-widget> custom element directly. Both syntaxes are equivalent — the Ekoo script detects both automatically.
1<!-- Alternative: use the custom element directly -->2<ekoo-widget3 data-ekoo="YOUR_WEBSITE_ID"4 data-ekoo-product-id="YOUR_PRODUCT_ID"5 data-ekoo-locale="fr"6></ekoo-widget>6. Advanced Options
1<!-- Shadow DOM: opt into full style isolation (default: open) -->2<ekoo-widget3 data-ekoo="YOUR_WEBSITE_ID"4 data-ekoo-product-id="YOUR_PRODUCT_ID"5 data-shadow-mode="closed"6></ekoo-widget>78<!-- Force SPA mode if auto-detection fails (rare) -->9<ekoo-widget10 data-ekoo="YOUR_WEBSITE_ID"11 data-ekoo-product-id="YOUR_PRODUCT_ID"12 data-ekoo-mode="spa"13></ekoo-widget>data-shadow-mode="closed"— Force full Shadow DOM isolation (default: open, which allows DevTools inspection and analytics tracking).data-ekoo-mode="spa"— Forces SPA mode if auto-detection fails (rare).- SPA mode is auto-detected for Next.js, Nuxt, React, Vue, Angular, and Sapper.
Remote configuration
The Ekoo widget automatically fetches its full visual configuration from the Ekoo backoffice based on your websiteId and productId. This includes: theme, colors, CTA texts, animation settings, position, and custom CSS. You don't need to set appearance attributes in your HTML — the backoffice configuration is applied automatically. Data attributes are only needed to override the backoffice configuration for a specific widget instance.
Next Steps
- Platform Integration Guides (React, Svelte, Shopify, GTM…)
- Managing Your Audio Content
- FAQ