Vue.js plugin for Crisp Chat
Crisp Chat Javascrip SDK Documentation
You can install the package via yarn:
yarn add @dansmaculotte/vue-crisp-chat
or npm:
npm install @dansmaculotte/vue-crisp-chat --save
import Vue from 'vue'
import CrispChat from '@dansmaculotte/vue-crisp-chat'
Vue.use(CrispChat, {
websiteId: 'YOUR_CRISP_CHAT_WEBSITE_ID',
disabled: true,
hideOnLoad: true
})
disabled
option allows you to prevent automatic script loading, to comply with GDPR.
You can manually load it by calling this.$crisp.load(YOUR_CRISP_CHAT_WEBSITE_ID)
.
When Crisp Chat is loaded it automatically shows the widget, to prevent this you can set to true
this option so you can manually show it after.
You can use any method coming from the official documentation.
Every methods are accessible from $crisp
object.
For example:
Vue.$crisp.do('chat:open')
// In a vue instance
this.$crisp.do('chat:open')
You can also listen to loaded
event emitted on script load.
For example:
this.$crisp.$on('loaded', (event) => {
console.log('crisp chat loaded')
})
yarn test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please contact Gaël Reyrol instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.