Skip to content

calebeaires/vue-tawk

This branch is up to date with papamonkey/vue-tawk:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

286ad6b · May 28, 2018

History

5 Commits
May 27, 2018
May 27, 2018
May 27, 2018
May 27, 2018
May 21, 2018
May 27, 2018
May 27, 2018
May 28, 2018
May 27, 2018

Repository files navigation

vue-tawk

wrapper of tawk

This Vue plugin injects a tawk.io instance into all of your vue instances

Install

npm install vue-tawk --save
or
yarn add vue-tawk -D

Usage

Initialize

First you'll need to register the plugin
Second you should had a account of https://www.tawk.to/

import Tawk from 'vue-echo'
  
Vue.use(Tawk, {
    tawkSrc: 'YOU_TAWK_SRC'
})

Set the visitor name and email

this.$Tawk.$updateChatUser(user)
the object of user should like that
{
    name: 'user name',
    email: 'user email',
    hash: '' // see more https://www.tawk.to/javascript-api/#securemode
}

Ends the current ongoing chat.

you should close the chat when user logout your website

this.$Tawk.$endChat()

About

wrapper of tawk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%