Standalone Widget
The standalone widget displays a single audio as a compact icon with an information bar that expands and collapses on click. It's the most common format for presenting an audio review on a product page.
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"Behavior
- On load, the widget displays a compact icon with a call-to-action text.
- On click, the information bar expands to reveal the audio player and review details.
- A second click collapses the bar (unless
alwaysOpenis enabled). - The widget only appears if a published audio is associated with the product.
Minimal Integration
Add the Ekoo script and a container with the data-ekoo and data-ekoo-product-id attributes:
1<!-- Ekoo Script -->2<script src="https://app.ekoo.co/widgets/widget-4.0.0-standalone.js"</script>34<!-- Widget container -->5<ekoo-widget6 data-ekoo="YOUR_WEBSITE_ID"7 data-ekoo-product-id="YOUR_PRODUCT_ID"8></ekoo-widget>Prerequisites
Standalone-Specific Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
reviewId | string | — | Identifier of a specific review to display. If omitted, the widget shows the first published audio for the product. |
direction | normal | reverse | normal | Expansion direction of the bar. normal = standard (left-to-right), reverse = inverted (right-to-left). |
animation | string | pulse | Animation type. Default is a pulsing rings effect that draws attention to the widget. |
animationDuration | string | continuous | Duration of the animation. Default is continuous (loops indefinitely). |
iconListen | string (URL) | — | URL of a custom icon for the listen button. |
chevron | boolean | true | Show or hide the open/close chevron indicator. |
closedStateMainText | string | — | Main text displayed when the widget is collapsed. |
closedStateSecondaryText | string | — | Secondary text displayed below the main text in the collapsed state. |
closedStateDisplayChevron | boolean | true | Show or hide the chevron in the collapsed state. |
alwaysOpen | boolean | false | If enabled, the widget stays expanded and cannot be collapsed by the user. |
Widget Direction
The direction parameter controls the expansion direction of the information bar:
normal(default) — Standard expansion direction (left-to-right on LTR pages).reverse— Inverted direction. Useful for right-aligned layouts.
Animation
The widget uses a pulse animation by default — pulsing rings that draw attention to the audio player. The animation runs continuously until the user interacts with the widget.
| Parameter | Default | Description |
|---|---|---|
animation | pulse | Animation type. The default pulse effect creates pulsing rings around the widget icon. |
animationDuration | continuous | How long the animation runs. Default is continuous (loops indefinitely). |
Complete Example
1<script src="https://app.ekoo.co/widgets/widget-4.0.0-standalone.js"</script>23<ekoo-widget4 data-ekoo="YOUR_WEBSITE_ID"5 data-ekoo-product-id="YOUR_PRODUCT_ID"6 data-ekoo-locale="fr"7 data-ekoo-direction="reverse"8 data-ekoo-animation="pulse"9 data-ekoo-always-open="true"10 data-ekoo-closed-state-main-text="Listen to a customer review"11 data-ekoo-closed-state-secondary-text="Verified audio"12 data-ekoo-scale="1.2"13 data-ekoo-on-event="onEkooEvent"14></ekoo-widget>Remote configuration
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 like data-ekoo-closed-state-main-text or data-ekoo-scale are only needed if you want to override the backoffice configuration for a specific widget instance.Optimize loading
For a faster widget start, load the script in the <head> with defer. See Script loading for the full pattern (preconnect, preload, per stack).
Same product, multiple widget configurations
One product can be displayed with several widget styles across your site without being duplicated. Save each style as a widget configuration in the backoffice, give it a stable reference (for example homepage or product-page), then point to it from your HTML with data-ekoo-variant:
1<!-- Same product (same audios, same reviewers), two different widget skins. -->2<!-- "homepage" and "product-page" are example values; replace them with the references -->3<!-- of widget configurations saved in your backoffice. -->45<!-- Homepage block -->6<ekoo-widget7 data-ekoo="YOUR_WEBSITE_ID"8 data-ekoo-product-id="SKU-001"9 data-ekoo-variant="homepage"10></ekoo-widget>1112<!-- Product page block -->13<ekoo-widget14 data-ekoo="YOUR_WEBSITE_ID"15 data-ekoo-product-id="SKU-001"16 data-ekoo-variant="product-page"17></ekoo-widget>Both blocks render the same product, with the same audios and reviewers — only the widget styling differs.
If no configuration matches
Ekoo first looks for a configuration whose reference matches the attribute value. If none is found, it falls back to a legacy lookup by configuration name (for older integrations), then to the configuration attached to the product, and finally to your website's default configuration. References are unique within a website and widget type, so the widget always resolves to a single configuration.
Custom element syntax
You can also use <ekoo-widget> instead of a <div>:
<ekoo-widget data-ekoo="..." data-ekoo-product-id="..."></ekoo-widget>
Both syntaxes are equivalent. The Ekoo script automatically detects both.