The launcher button shows the text and icon set in the admin panel on every page where the widget is installed. To show something different on a page, for example "Talk to us" on your website and "Need help?" inside your app, add a short script to that page. Setting this up needs a developer.
Setting the launcher text and icon for a page
Add this script to the page, above your NeetoChat JavaScript snippet:
<script>
window.NeetoChat = window.NeetoChat || {};
window.NeetoChat.widgetConfig = {
type: "iconandtext",
text: "Talk to us",
image: "message",
};
</script>
On the pages inside your app, add the same script with your own values, for example text: "Need help?". Pages without this script keep using the admin panel settings. Any option you leave out of the script also keeps its admin panel value.
Launcher options
Option |
What it changes |
|---|---|
|
What the launcher shows: |
|
The launcher text. Keep it within 25 characters, the same limit as the admin panel. |
|
The launcher icon: |
|
The link to your own icon image, for example |
Use the values exactly as written above. A misspelled type hides the text, and a misspelled image hides the icon.
Changing the launcher without a page reload
If your app moves between pages without reloading, such as a single-page app, set the new values and then call updateWidget():
window.NeetoChat.widgetConfig = {
type: "iconandtext",
text: "Need help?",
image: "agents",
};
window.NeetoChat.contextualHelp.updateWidget();
Include every option each time. An option you leave out keeps the value from the previous page, not the admin panel value.
For other ways to control the widget with JavaScript, see Using JavaScript to control NeetoChat widget.