Widget installeren

Getting Started5 weergaven

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

  1. Ga in de Shopify-admin naar Online Store -> Themes -> Actions -> Edit Code.
  2. Open theme.liquid.
  3. Plak de embedcode voor \</body\>.
  4. Klik op Save.

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?