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-audio-preloadmetadatadata-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="YOUR_WEBSITE_ID"3 data-ekoo-product-id="YOUR_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.
<ekoo-widget>written in the page, rendered by your framework or inserted later → It initializes by itself and reloads whendata-ekoo-product-idchanges: bind this attribute to the route or the page data.<div data-ekoo>orwindow.ekooOptions→ Turned into widgets when the script loads. To add a widget later, for example from a tag manager, insert an<ekoo-widget>.
Platform Guides
Server rendering writes the transcript into the initial HTML, readable by crawlers that do not run JavaScript. The other integrations show the widget in the browser. See the SSR, SEO & GEO guide.
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.