Skip to content

dansmaculotte/vue-crisp-chat

Repository files navigation

vue-crisp-chat

Latest Version on NPM Software License Build Status

Vue.js plugin for Crisp Chat

Crisp Chat Javascrip SDK Documentation

Installation

You can install the package via yarn:

yarn add @dansmaculotte/vue-crisp-chat

or npm:

npm install @dansmaculotte/vue-crisp-chat --save

Setup

import Vue from 'vue'
import CrispChat from '@dansmaculotte/vue-crisp-chat'

Vue.use(CrispChat, {
  websiteId: 'YOUR_CRISP_CHAT_WEBSITE_ID',
  disabled: true,
  hideOnLoad: true
})

Options

disabled

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).

hideOnLoad

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.

Usage

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')
})

Testing

yarn test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please contact Gaël Reyrol instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Credits