Integration
Choose the integration method that best fits your tech stack
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"Two Approaches
1. Data Attributes Recommended
The standard approach: place a container with data-ekoo-* attributes and load the official script. This is the recommended method for all new integrations.
1<ekoo-widget2 data-ekoo="MY_WEBSITE_ID"3 data-ekoo-product-id="MY_PRODUCT_ID"4 data-ekoo-locale="fr"5></ekoo-widget>67<script src="https://app.ekoo.co/widgets/widget-4.0.0-standalone.js"</script>2. window.ekooOptions Legacy
The older approach that uses a global window.ekooOptions object to configure the widget programmatically. The expected structure contains a websiteId and a widgets array (each entry referencing a DOM container via nodeId). It is maintained for backward compatibility but is no longer recommended for new projects.
1window.ekooOptions = {2 websiteId: "YOUR_WEBSITE_ID",3 widgets: [4 {5 nodeId: "my-container", // ID of the target DOM element6 productId: "my-product-123",7 locale: "fr" // optional8 }9 ]10};Note
Regardless of the approach you choose, the script to load is always widget-4.0.0-standalone.js.
When to Use Which Approach?
- New integration → Data attributes. It is simpler, more readable, and requires no additional JavaScript.
- Migrating from an old integration → Switch to data attributes as soon as possible. See the migration guide.
- SPA integration (React, Svelte, Ionic…) → Data attributes + JavaScript API (
ekooLoad,ekooUnload,ekooReload) to manage the lifecycle.
Platform Guides
Performance — script loading
Whatever your stack, you can speed up the widget's appearance by loading the Ekoo script in the <head> with defer. See the Script loading page.