Widget installeren
Je embedcode ophalen
Ga naar Dashboard -> Assistants -> Your Bot -> Embed Code. Je ziet daar een snippet zoals dit:
<script src="https://cdn.conviro.io/widget/widget.iife.js"></script>
<script>
cw('init', { publicKey: 'pk_YOUR_PUBLIC_KEY' });
</script>
Hieronder vind je stapsgewijze instructies voor alle gangbare platformen.
WordPress
- Ga naar je WordPress-beheerpaneel.
- Ga naar Appearance -> Theme File Editor -> footer.php (of gebruik een plugin zoals Insert Headers and Footers).
- Plak de embedcode vlak voor de \</body\>-tag.
- Klik op Update File.
- Leeg de cache van een eventuele cachingplugin (WP Super Cache, W3 Total Cache enzovoort) en controleer het resultaat.
Shopify
- Ga in de Shopify-admin naar Online Store -> Themes -> Actions -> Edit Code.
- Open theme.liquid.
- Plak de embedcode voor \</body\>.
- Klik op Save.
Wix
- Ga in je Wix-dashboard naar Settings -> Custom Code.
- Klik op + Add Custom Code.
- Plak de embedcode en stel de plaatsing in op Body - End.
- Pas het toe op All pages en klik op Apply.
Squarespace
- Ga naar Settings -> Advanced -> Code Injection.
- Plak de embedcode in het veld Footer.
- Klik op Save.
Eigen HTML / statische sites
Plak de embedcode gewoon voor de afsluitende \</body\>-tag in je HTML-bestand. Het widgetscript laadt asynchroon en blokkeert het renderen van de pagina niet.
React / Next.js
In React- of Next.js-projecten kun je de widget laden in je root-layout of in je \<App\>-component:
// app/layout.tsx (Next.js App Router example)
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<Script
src="https://cdn.conviro.io/widget/widget.iife.js"
strategy="afterInteractive"
/>
<Script id="conviro-init" strategy="afterInteractive">
{`cw('init', { publicKey: 'pk_YOUR_PUBLIC_KEY' });`}
</Script>
</body>
</html>
);
}
De installatie controleren
- Open je website in een browser.
- Je zou de Conviro-chatbubbel rechtsonder moeten zien (of linksonder, afhankelijk van je instellingen).
- Verschijnt hij niet, raadpleeg dan het troubleshootingartikel Widget wordt niet weergegeven.