Pour intégrer Chatwoot à votre application Vue.js, vous devez coller le script du widget Chatwoot dans le fichier `index.html` de votre application Vue.js.

Voici comment procéder :

## Étape 1. Récupérez votre script de widget[​](https://www.chatwoot.com/docs/product/channels/live-chat/integrations/vue#1-get-your-widget-script "Direct link to heading")

Votre script de widget se trouve dans les paramètres de votre boîte de réception du site web. Allez dans Paramètres -> Boîtes de réception -> Sélectionnez votre canal Site web > onglet `Configuration`.

Si vous n’avez pas encore créé de boîte de réception pour un site web, vous pouvez trouver les instructions détaillées [ici](https://www.chatwoot.com/hc/user-guide/articles/1677580558-website-live-chat-settings-explained).

## Étape 2. Copiez le script[**​**](https://www.chatwoot.com/docs/product/channels/live-chat/integrations/vue#2-copy-the-script "Direct link to heading")

Copiez le script qui a été créé dans le champ `code` du canal.

![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK2x6VHc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--742964bf7893816db8255942c6e56582a9d9bc93/script%20for%20a%20website%20inbox.png)

## Étape 3. Collez le script ici[​](https://www.chatwoot.com/docs/product/channels/live-chat/integrations/vue#3-paste-the-script-here "Direct link to heading")

Ouvrez votre projet Vue et collez le script dans le fichier index.html, juste avant la balise de fermeture `</body>`.

```
<body>
  <noscript>
    <strong
      >Nous sommes désolés mais <%= htmlWebpackPlugin.options.title %> ne fonctionne pas correctement sans JavaScript activé. Veuillez l'activer pour continuer.</strong
    >
  </noscript>
  <div id="app"></div>
  <!-- built files will be auto injected -->

  <!-- Chatwoot script goes here -->
  <script>
    (function (d, t) {
      var BASE_URL = "https://example.com";
      var g = d.createElement(t),
        s = d.getElementsByTagName(t)[0];
      g.src = BASE_URL + "/packs/js/sdk.js";
      g.defer = true;
      g.async = true;
      s.parentNode.insertBefore(g, s);
      g.onload = function () {
        window.chatwootSDK.run({
          websiteToken: "yZ7USzaEs7hrwUAHLGwjbxJ1",
          baseUrl: BASE_URL,
        });
      };
    })(document, "script");
  </script>
  <!-- Chatwoot script goes here -->
</body>
```

## Étape 4. Vérifiez 

Vous pourrez maintenant voir le widget Chatwoot sur la page. Quelque chose comme ceci :

![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBL2R6VHc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--2f073ca9ea425355fb29783559691c9521a8f00b/vue.png)

### Module Vue.js, Nuxt.js[​](https://www.chatwoot.com/docs/product/channels/live-chat/integrations/vue#vuejs-nuxtjs-module "Direct link to heading")

Un module maintenu par la communauté (créé par la formidable équipe de [@huntersofbook](https://github.com/productdevbook/chatwoot)) est disponible pour intégrer Chatwoot dans vos projets Vue 3 et Nuxt 3. Vous pouvez voir une [démo ici](http://vue-chatwoot-plugin.vercel.app/).

* Voir le [module Vue 3](https://github.com/productdevbook/chatwoot/tree/main/demo/vue3).

* Voir le [module Nuxt 3](https://github.com/productdevbook/chatwoot/tree/main/demo/nuxt3).


