diff --git a/docs/api-reference.md b/docs/api-reference.md
index 4fa4922..3f8a4f8 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -11,70 +11,70 @@ Use the JavaScript API to manipulate the chat widget displayed on your website.
## Table of contents
- [API Reference](#api-reference)
- [Table of contents](#table-of-contents)
- - [onLoad](#onload)
- - [onStatusChange](#onstatuschange)
- - [onBeforeLoad](#onbeforeload)
- - [onChatMaximized](#onchatmaximized)
- - [onChatMinimized](#onchatminimized)
- - [onChatHidden](#onchathidden)
- - [onChatStarted](#onchatstarted)
- - [onChatEnded](#onchatended)
- - [onPrechatSubmit](#onprechatsubmit)
- - [onOfflineSubmit](#onofflinesubmit)
- - [onChatMessageVisitor](#onchatmessagevisitor)
- - [onChatMessageAgent](#onchatmessageagent)
- - [onChatMessageSystem](#onchatmessagesystem)
- - [onAgentJoinChat](#onagentjoinchat)
- - [onAgentLeaveChat](#onagentleavechat)
- - [onChatSatisfaction](#onchatsatisfaction)
- - [onVisitorNameChanged](#onvisitornamechanged)
- - [onFileUpload](#onfileupload)
- - [onTagsUpdated](#ontagsupdated)
- - [onUnreadCountChanged](#onunreadcountchanged)
- - [visitor](#visitor)
+ - [tawkOnLoad](#tawkonload)
+ - [tawkOnStatusChange](#tawkonstatuschange)
+ - [tawkOnBeforeLoad](#tawkonbeforeload)
+ - [tawkOnChatMaximized](#tawkonchatmaximized)
+ - [tawkOnChatMinimized](#tawkonchatminimized)
+ - [tawkOnChatHidden](#tawkonchathidden)
+ - [tawkOnChatStarted](#tawkonchatstarted)
+ - [tawkOnChatEnded](#tawkonchatended)
+ - [tawkOnPrechatSubmit](#tawkonprechatsubmit)
+ - [tawkOnOfflineSubmit](#tawkonofflinesubmit)
+ - [tawkOnChatMessageVisitor](#tawkonchatmessagevisitor)
+ - [tawkOnChatMessageAgent](#tawkonchatmessageagent)
+ - [tawkOnChatMessageSystem](#tawkonchatmessagesystem)
+ - [tawkOnAgentJoinChat](#tawkonagentjoinchat)
+ - [tawkOnAgentLeaveChat](#tawkonagentleavechat)
+ - [tawkOnChatSatisfaction](#tawkonchatsatisfaction)
+ - [tawkOnVisitorNameChanged](#tawkonvisitornamechanged)
+ - [tawkOnFileUpload](#tawkonfileupload)
+ - [tawkOnTagsUpdated](#tawkontagsupdated)
+ - [tawkOnUnreadCountChanged](#tawkonunreadcountchanged)
+ - [tawkVisitor](#tawkvisitor)
- [autoStart](#autostart)
- [start](#start)
- - [shutdown](#shutdown)
- - [maximize](#maximize)
- - [minimize](#minimize)
- - [toggle](#toggle)
- - [popup](#popup)
- - [getWindowType](#getwindowtype)
- - [showWidget](#showwidget)
- - [hideWidget](#hidewidget)
- - [toggleVisibility](#togglevisibility)
- - [getStatus](#getstatus)
- - [isChatMaximized](#ischatmaximized)
- - [isChatMinimized](#ischatminimized)
- - [isChatHidden](#ischathidden)
- - [isChatOngoing](#ischatongoing)
- - [isVisitorEngaged](#isvisitorengaged)
- - [onLoaded](#onloaded)
- - [onBeforeLoaded](#onbeforeloaded)
- - [widgetPosition](#widgetposition)
- - [endChat](#endchat)
- - [setAttributes](#setattributes)
- - [addEvent](#addevent)
- - [addTags](#addtags)
- - [removeTags](#removetags)
+ - [tawkShutdown](#tawkshutdown)
+ - [tawkMaximize](#tawkmaximize)
+ - [tawkMinimize](#tawkminimize)
+ - [tawkToggle](#tawktoggle)
+ - [tawkPopup](#tawkpopup)
+ - [tawkGetWindowType](#tawkgetwindowtype)
+ - [tawkShowWidget](#tawkshowwidget)
+ - [tawkHideWidget](#tawkhidewidget)
+ - [tawkToggleVisibility](#tawktogglevisibility)
+ - [tawkGetStatus](#tawkgetstatus)
+ - [tawkIsChatMaximized](#tawkischatmaximized)
+ - [tawkIsChatMinimized](#tawkischatminimized)
+ - [tawkIsChatHidden](#tawkischathidden)
+ - [tawkIsChatOngoing](#tawkischatongoing)
+ - [tawkIsVisitorEngaged](#tawkisvisitorengaged)
+ - [tawkOnLoaded](#tawkonloaded)
+ - [tawkOnBeforeLoaded](#tawkonbeforeloaded)
+ - [tawkWidgetPosition](#tawkwidgetposition)
+ - [tawkEndChat](#tawkendchat)
+ - [tawkSetAttributes](#tawksetattributes)
+ - [tawkAddEvent](#tawkaddevent)
+ - [tawkAddTags](#tawkaddtags)
+ - [tawkRemoveTags](#tawkremovetags)
- [secureMode](#securemode)
- [customstyle](#customstyle)
- [zIndex](#zindex)
- [Visibility](#visibility)
- - [switchWidget](#switchwidget)
+ - [tawkSwitchWidget](#tawkswitchwidget)
-## onLoad
+## tawkOnLoad
Callback function invoked right after the widget is rendered. This callback is not supported in
pop out chat window.
`Composition API`
```html
@@ -83,10 +83,10 @@ pop out chat window.
`Options API`
```js
export default {
- inject : ['onLoad'],
+ inject : ['tawkOnLoad'],
mounted() {
- this.onLoad(() => {
+ this.tawkOnLoad(() => {
// place your code here
});
}
@@ -95,15 +95,15 @@ export default {
-## onStatusChange
+## tawkOnStatusChange
Callback function invoked when the page status changes. The function will receive the changed status which will be either online, away or offline. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -112,10 +112,10 @@ Callback function invoked when the page status changes. The function will receiv
`Options API`
```js
export default {
- inject : ['onStatusChange'],
+ inject : ['tawkOnStatusChange'],
mounted() {
- this.onStatusChange((status) => {
+ this.tawkOnStatusChange((status) => {
// place your code here
});
}
@@ -124,15 +124,15 @@ export default {
-## onBeforeLoad
+## tawkOnBeforeLoad
Callback function invoked right when Tawk_API is ready to be used and before the widget is rendered. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -141,10 +141,10 @@ Callback function invoked right when Tawk_API is ready to be used and before the
`Options API`
```js
export default {
- inject : ['onBeforeLoad'],
+ inject : ['tawkOnBeforeLoad'],
mounted() {
- this.onBeforeLoad(() => {
+ this.tawkOnBeforeLoad(() => {
// place your code here
});
}
@@ -153,15 +153,15 @@ export default {
-## onChatMaximized
+## tawkOnChatMaximized
Callback function invoked when the widget is maximized. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -170,10 +170,10 @@ Callback function invoked when the widget is maximized. This callback is not sup
`Options API`
```js
export default {
- inject : ['onChatMaximized'],
+ inject : ['tawkOnChatMaximized'],
mounted() {
- this.onChatMaximized(() => {
+ this.tawkOnChatMaximized(() => {
// place your code here
});
}
@@ -182,15 +182,15 @@ export default {
-## onChatMinimized
+## tawkOnChatMinimized
Callback function invoked when the widget is minimized. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -199,10 +199,10 @@ Callback function invoked when the widget is minimized. This callback is not sup
`Options API`
```js
export default {
- inject : ['onChatMinimized'],
+ inject : ['tawkOnChatMinimized'],
mounted() {
- this.onChatMinimized(() => {
+ this.tawkOnChatMinimized(() => {
// place your code here
});
}
@@ -211,15 +211,15 @@ export default {
-## onChatHidden
+## tawkOnChatHidden
Callback function invoked when the widget is hidden. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -228,10 +228,10 @@ Callback function invoked when the widget is hidden. This callback is not suppor
`Options API`
```js
export default {
- inject : ['onChatHidden'],
+ inject : ['tawkOnChatHidden'],
mounted() {
- this.onChatHidden(() => {
+ this.tawkOnChatHidden(() => {
// place your code here
});
}
@@ -240,15 +240,15 @@ export default {
-## onChatStarted
+## tawkOnChatStarted
Callback function invoked when the widget is started.
`Composition API`
```html
@@ -257,10 +257,10 @@ Callback function invoked when the widget is started.
`Options API`
```js
export default {
- inject : ['onChatStarted'],
+ inject : ['tawkOnChatStarted'],
mounted() {
- this.onChatStarted(() => {
+ this.tawkOnChatStarted(() => {
// place your code here
});
}
@@ -269,15 +269,15 @@ export default {
-## onChatEnded
+## tawkOnChatEnded
Callback function invoked when the widget is ended. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -286,10 +286,10 @@ Callback function invoked when the widget is ended. This callback is not support
`Options API`
```js
export default {
- inject : ['onChatEnded'],
+ inject : ['tawkOnChatEnded'],
mounted() {
- this.onChatEnded(() => {
+ this.tawkOnChatEnded(() => {
// place your code here
});
}
@@ -298,15 +298,15 @@ export default {
-## onPrechatSubmit
+## tawkOnPrechatSubmit
Callback function invoked when the Pre-Chat Form is submitted. The submitted form data is passed to the function. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -315,10 +315,10 @@ Callback function invoked when the Pre-Chat Form is submitted. The submitted for
`Options API`
```js
export default {
- inject : ['onPrechatSubmit'],
+ inject : ['tawkOnPrechatSubmit'],
mounted() {
- this.onPrechatSubmit((data) => {
+ this.tawkOnPrechatSubmit((data) => {
// place your code here
});
}
@@ -327,15 +327,15 @@ export default {
-## onOfflineSubmit
+## tawkOnOfflineSubmit
Callback function invoked when the Offline form is submitted. The submitted form data is passed to the function. Form data will contain {name : ”, email : ”, message : ”, questions : []}. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -344,10 +344,10 @@ Callback function invoked when the Offline form is submitted. The submitted form
`Options API`
```js
export default {
- inject : ['onOfflineSubmit'],
+ inject : ['tawkOnOfflineSubmit'],
mounted() {
- this.onOfflineSubmit((data => {
+ this.tawkOnOfflineSubmit((data => {
// place your code here
});
}
@@ -356,15 +356,15 @@ export default {
-## onChatMessageVisitor
+## tawkOnChatMessageVisitor
Callback function invoked when message is sent by the visitor. The message is passed to the function. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -373,10 +373,10 @@ Callback function invoked when message is sent by the visitor. The message is pa
`Options API`
```js
export default {
- inject : ['onChatMessageVisitor'],
+ inject : ['tawkOnChatMessageVisitor'],
mounted() {
- this.onChatMessageVisitor((message) => {
+ this.tawkOnChatMessageVisitor((message) => {
// place your code here
});
}
@@ -385,15 +385,15 @@ export default {
-## onChatMessageAgent
+## tawkOnChatMessageAgent
Callback function invoked when message is sent by the agent. The message is passed to the function. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -402,10 +402,10 @@ Callback function invoked when message is sent by the agent. The message is pass
`Options API`
```js
export default {
- inject : ['onChatMessageeAgent'],
+ inject : ['tawkOnChatMessageAgent'],
mounted() {
- this.onChatMessageeAgent((message) => {
+ this.tawkOnChatMessageAgent((message) => {
// place your code here
});
}
@@ -414,15 +414,15 @@ export default {
-## onChatMessageSystem
+## tawkOnChatMessageSystem
Callback function invoked when message is sent by the system. The message is passed to the function. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -431,10 +431,10 @@ Callback function invoked when message is sent by the system. The message is pas
`Options API`
```js
export default {
- inject : ['onChatMessageSystem'],
+ inject : ['tawkOnChatMessageSystem'],
mounted() {
- this.onChatMessageSystem((message) => {
+ this.tawkOnChatMessageSystem((message) => {
// place your code here
});
}
@@ -443,15 +443,15 @@ export default {
-## onAgentJoinChat
+## tawkOnAgentJoinChat
Callback function invoked when an agent joins the chat. The data is passed to the function. Will contain {name : ”, position : ”, image : ”, id : ”}. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -460,10 +460,10 @@ Callback function invoked when an agent joins the chat. The data is passed to th
`Options API`
```js
export default {
- inject : ['onAgentJoinChat'],
+ inject : ['tawkOnAgentJoinChat'],
mounted() {
- this.onAgentJoinChat((data) => {
+ this.tawkOnAgentJoinChat((data) => {
// place your code here
});
}
@@ -472,15 +472,15 @@ export default {
-## onAgentLeaveChat
+## tawkOnAgentLeaveChat
Callback function invoked when an agent leaves the chat. The data is passed to the function. Will contain {name : ”, id : ”}. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -489,10 +489,10 @@ Callback function invoked when an agent leaves the chat. The data is passed to t
`Options API`
```js
export default {
- inject : ['onAgentLeaveChat'],
+ inject : ['tawkOnAgentLeaveChat'],
mounted() {
- this.onAgentLeaveChat((data) => {
+ this.tawkOnAgentLeaveChat((data) => {
// place your code here
});
}
@@ -501,15 +501,15 @@ export default {
-## onChatSatisfaction
+## tawkOnChatSatisfaction
Callback function invoked when an agent leaves the chat. The satisfaction is passed to the function. -1 = dislike | 0 = neutral | 1 = like. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -518,10 +518,10 @@ Callback function invoked when an agent leaves the chat. The satisfaction is pas
`Options API`
```js
export default {
- inject : ['onChatSatisfaction'],
+ inject : ['tawkOnChatSatisfaction'],
mounted() {
- this.onChatSatisfaction((satisfaction) => {
+ this.tawkOnChatSatisfaction((satisfaction) => {
// place your code here
});
}
@@ -530,15 +530,15 @@ export default {
-## onVisitorNameChanged
+## tawkOnVisitorNameChanged
Callback function invoked when the visitor manually changes his name. The visitorName is passed to the function. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -547,10 +547,10 @@ Callback function invoked when the visitor manually changes his name. The visito
`Options API`
```js
export default {
- inject : ['onVisitorNameChanged'],
+ inject : ['tawkOnVisitorNameChanged'],
mounted() {
- this.onVisitorNameChanged((visitorName) => {
+ this.tawkOnVisitorNameChanged((visitorName) => {
// place your code here
});
}
@@ -559,15 +559,15 @@ export default {
-## onFileUpload
+## tawkOnFileUpload
Callback function invoked when a file is uploaded. The link to the uploaded file is passed to the function. This callback is not supported in pop out chat window.
`Composition API`
```html
@@ -576,10 +576,10 @@ Callback function invoked when a file is uploaded. The link to the uploaded file
`Options API`
```js
export default {
- inject : ['onFileUpload'],
+ inject : ['tawkOnFileUpload'],
mounted() {
- this.onFileUpload((link) => {
+ this.tawkOnFileUpload((link) => {
// place your code here
});
}
@@ -588,15 +588,15 @@ export default {
-## onTagsUpdated
+## tawkOnTagsUpdated
Callback function invoked when a tag is updated.
`Composition API`
```html
@@ -605,10 +605,10 @@ Callback function invoked when a tag is updated.
`Options API`
```js
export default {
- inject : ['onTagsUpdated'],
+ inject : ['tawkOnTagsUpdated'],
mounted() {
- this.onTagsUpdated((data) => {
+ this.tawkOnTagsUpdated((data) => {
// place your code here
});
}
@@ -617,15 +617,15 @@ export default {
-## onUnreadCountChanged
+## tawkOnUnreadCountChanged
Callback function returns count of unread messages.
`Composition API`
```html
@@ -634,10 +634,10 @@ Callback function returns count of unread messages.
`Options API`
```js
export default {
- inject : ['onUnreadCountChanged'],
+ inject : ['tawkOnUnreadCountChanged'],
mounted() {
- this.onUnreadCountChanged((count) => {
+ this.tawkOnUnreadCountChanged((count) => {
// place your code here
});
}
@@ -646,7 +646,7 @@ export default {
-## visitor
+## tawkVisitor
Object used to set the visitor name and email. Do not place this object in a function, as the values need to be available before the widget script is downloaded.
Setting or changing the values after the widget script has been downloaded will not send the values to the dashboard.
@@ -656,9 +656,9 @@ If the name and email will not be available on load time (eg single page app, aj
`Composition API`
```html
@@ -714,53 +713,52 @@ Start the tawk socket connection.
`Options API`
```js
export default {
- inject : ['start', 'onLoad'],
+ inject : ['tawkStart'],
mounted() {
- this.start();
+ this.tawkStart();
}
}
```
-## shutdown
+## tawkShutdown
End the tawk socket connection.
`Composition API`
```html
```
`Options API`
```js
export default {
- inject : ['shutdown', 'onLoad'],
+ inject : ['tawkShutdown'],
mounted() {
- this.shutdown();
+ this.tawkShutdown();
}
}
```
-## maximize
+## tawkMaximize
Maximizes the chat widget.
`Composition API`
```html
```
@@ -768,11 +766,11 @@ Maximizes the chat widget.
`Options API`
```js
export default {
- inject : ['maximize', 'onLoad'],
+ inject : ['tawkMaximize', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.maximize();
+ this.tawkOnLoad(() => {
+ this.tawkMaximize();
});
}
}
@@ -780,17 +778,17 @@ export default {
-## minimize
+## tawkMinimize
Minimizes the chat widget.
`Composition API`
```html
```
@@ -798,11 +796,11 @@ Minimizes the chat widget.
`Options API`
```js
export default {
- inject : ['minimize', 'onLoad'],
+ inject : ['tawkMinimize', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.minimize();
+ this.tawkOnLoad(() => {
+ this.tawkMinimize();
});
}
}
@@ -810,17 +808,17 @@ export default {
-## toggle
+## tawkToggle
Minimizes or Maximizes the chat widget based on the current state.
`Composition API`
```html
```
@@ -828,11 +826,11 @@ Minimizes or Maximizes the chat widget based on the current state.
`Options API`
```js
export default {
- inject : ['toggle', 'onLoad'],
+ inject : ['tawkToggle', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.toggle();
+ this.tawkOnLoad(() => {
+ this.tawkToggle();
});
}
}
@@ -840,17 +838,17 @@ export default {
-## popup
+## tawkPopup
Opens the chat widget as a pop out.
`Composition API`
```html
```
@@ -858,11 +856,11 @@ Opens the chat widget as a pop out.
`Options API`
```js
export default {
- inject : ['popup', 'onLoad'],
+ inject : ['tawkPopup', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.popup();
+ this.tawkOnLoad(() => {
+ this.tawkPopup();
});
}
}
@@ -870,17 +868,17 @@ export default {
-## getWindowType
+## tawkGetWindowType
Returns the current widget type whether it’s inline or embed.
`Composition API`
```html
```
@@ -926,11 +924,11 @@ Shows the chat widget.
`Options API`
```js
export default {
- inject : ['showWidget', 'onLoad'],
+ inject : ['tawkShowWidget', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.showWidget();
+ this.tawkOnLoad(() => {
+ this.tawkShowWidget();
});
}
}
@@ -938,17 +936,17 @@ export default {
-## hideWidget
+## tawkHideWidget
Hide the chat widget.
`Composition API`
```html
```
@@ -956,11 +954,11 @@ Hide the chat widget.
`Options API`
```js
export default {
- inject : ['hideWidget', 'onLoad'],
+ inject : ['tawkHideWidget', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.hideWidget();
+ this.tawkOnLoad(() => {
+ this.tawkHideWidget();
});
}
}
@@ -968,17 +966,17 @@ export default {
-## toggleVisibility
+## tawkToggleVisibility
Hides or Shows the chat widget based on the current visibility state.
`Composition API`
```html
```
@@ -986,11 +984,11 @@ Hides or Shows the chat widget based on the current visibility state.
`Options API`
```js
export default {
- inject : ['toggleVisibility', 'onLoad'],
+ inject : ['tawkToggleVisibility', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.toggleVisibility();
+ this.tawkOnLoad(() => {
+ this.tawkToggleVisibility();
});
}
}
@@ -998,19 +996,19 @@ export default {
-## getStatus
+## tawkGetStatus
Returns the current page status (online, away or offline).
`Composition API`
```html
@@ -1227,25 +1225,25 @@ Returns a boolean value (true or undefined) indicating when the plugin is ready.
`Options API`
```js
export default {
- inject : ['onLoaded'],
+ inject : ['tawkOnLoaded'],
mounted() {
- if(this.onLoaded()) {
+ if(this.tawkOnLoaded()) {
// do something when widget is loaded
}
}
}
```
-## onBeforeLoaded
+## tawkOnBeforeLoaded
Returns a boolean value (true or undefined) indicating when plugin is initialize.
`Composition API`
```html
@@ -1254,27 +1252,27 @@ Returns a boolean value (true or undefined) indicating when plugin is initialize
`Options API`
```js
export default {
- inject : ['onBeforeLoaded'],
+ inject : ['tawkOnBeforeLoaded'],
mounted() {
- if(this.onBeforeLoaded()) {
+ if(this.tawkOnBeforeLoaded()) {
// do something before onload
}
}
}
```
-## widgetPosition
+## tawkWidgetPosition
Returns a string for current position of the widget.
`Composition API`
```html
```
@@ -1316,11 +1314,11 @@ Ends the current ongoing chat.
`Options API`
```js
export default {
- inject : ['endChat', 'onLoad'],
+ inject : ['tawkEndChat', 'tawkOnLoad'],
mounted() {
- this.onLoad(() => {
- this.endChat();
+ this.tawkOnLoad(() => {
+ this.tawkEndChat();
});
}
}
@@ -1329,7 +1327,7 @@ export default {
-## setAttributes
+## tawkSetAttributes
Set custom metadata regarding this chat/visitor.
This function takes in two values: attribute and callback.
@@ -1359,11 +1357,11 @@ Error messages returned:
`Composition API`
```html