Widget installeren

Getting Started

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

  1. Ga naar je WordPress-beheerpaneel.
  2. Ga naar Appearance -> Theme File Editor -> footer.php (of gebruik een plugin zoals Insert Headers and Footers).
  3. Plak de embedcode vlak voor de \</body\>-tag.
  4. Klik op Update File.
  5. Leeg de cache van een eventuele cachingplugin (WP Super Cache, W3 Total Cache enzovoort) en controleer het resultaat.

Shopify

In Shopify plak je de embedcode niet in je thema. Gebruik in plaats daarvan de app Conviro uit de Shopify App Store – de widget is de app-insluiting Conviro AI Chat van die app:

  1. Installeer Conviro vanuit de Shopify App Store en koppel je Conviro-werkruimte (zie het artikel Shopify-integratie).
  2. Klik in de app op Turn on in theme editor. De thema-editor opent met de app-insluiting Conviro AI Chat ingeschakeld.
  3. Klik op Save.

Er wordt geen themacode aangepast.

Wix

  1. Ga in je Wix-dashboard naar Settings -> Custom Code.
  2. Klik op + Add Custom Code.
  3. Plak de embedcode en stel de plaatsing in op Body - End.
  4. Pas het toe op All pages en klik op Apply.

Squarespace

  1. Ga naar Settings -> Advanced -> Code Injection.
  2. Plak de embedcode in het veld Footer.
  3. 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

  1. Open je website in een browser.
  2. Je zou de Conviro-chatbubbel rechtsonder moeten zien (of linksonder, afhankelijk van je instellingen).
  3. Verschijnt hij niet, raadpleeg dan het troubleshootingartikel Widget wordt niet weergegeven.
widgetinstallationwordpressshopifywixsquarespacereactnextjsembed

Was dit artikel nuttig?