Platform-specific install
Where the script tag goes on the platforms customers ask about most. In every case it is the same snippet.
Website builders and CMS
- WordPress
- Appearance → Theme File Editor →
footer.php, before</body>. Or use any "insert headers and footers" plugin and paste into the footer/body field. Editing a child theme survives theme updates; editing the parent theme does not. - Shopify
- Online Store → Themes → Edit code →
layout/theme.liquid, before</body>. - Webflow
- Project settings → Custom code → Footer code, then publish. Custom code does not run on the Designer canvas. Test on the published site.
- Wix
- Settings → Custom code → Add custom code, place it at the end of the body, apply to all pages.
- Squarespace
- Settings → Advanced → Code injection → Footer. Requires a Business plan or above.
- Ghost
- Settings → Code injection → Site footer.
JavaScript frameworks
Next.js (App Router)
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://cdn.oyechats.com/oyechats-widget.js"
data-bot-key="bot-6a427d4529b9"
strategy="lazyOnload"
/>
</body>
</html>
);
}React, Vue or any SPA
Put the snippet in the static index.html rather than injecting it from a component. A component-mounted script re-runs on route changes and can mount the widget more than once.
Google Tag Manager
Create a Custom HTML tag containing the snippet and fire it on All Pages. GTM injects into the DOM at runtime, which the widget supports. If your GTM container is itself consent-gated, use the consent-gated install pattern so the two gates do not fight.
Single-page apps and route changes
The widget survives client-side navigation on its own. It lives outside your app's render tree, so it does not unmount when a route changes. You do not need to re-initialise it per route.
Something here wrong or missing? Tell us and name this page. We will fix it.