Code Monkey home page Code Monkey logo

vue-tidio's Introduction

Vue Tidio Chat Integration

Simple Vue 3 Tidio Chat integration

Use older version v1.0.1 for Vue 2

Getting started

  • Install vue-tidio library
# run
npm i vue-tidio
# or
yarn add vue-tidio
  • Import package and install plugin
import { createApp } from 'vue';
import VueTidio from 'vue-tidio';
import App from './App.vue';

// required `appKey` param (tidio public key)

// available additional `delay` param
// to delay tidio script load (default: 0 ms)

const app = createApp(App);

app.use(VueTidio, { appKey: 'XXX' });

app.mount('#app');
  • Configure chat visibility per page
const ROUTES: {
  {
    name: 'home',
    component: HomeComponent,
    meta: {
      showChat: true
    }
  }
  // etc.
};

router.afterEach((to) => {
  window.tidioChatApi &&
    window.tidioChatApi.display(to.meta.showChat);
});

LICENCE MIT - Created by Nikola Spalevic ([email protected])

vue-tidio's People

Contributors

nikolasp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zifichai wenkz

vue-tidio's Issues

Cant call display

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary
    I am using the version 1.01 because I am with Vue 2.
    I try to call Vue.prototype.$tidioChatApi.display but I get an error that $tidioChatApi is undefined.
    If I display with console.log the contain of "Vue.prototype", I can see $tidioChatApi:

$tidioChatApi: t

I am using Vue 2.6.12 using javascript (no typescript)

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.