1. Function Introduction
Adding a chat plug-in to your site can help you answer visitors' inquiries, and you can add third-party traffic channels to the chat plug-in to help you achieve application scenarios of traffic diversion and diversion.
This chapter will focus on how to add a chat plug-in to your site.
2. Operation process
hint
If you build your site, you can install the SaleSmartly chat plugin on your website through JavaScript code
2.1 Copy the code
•In [ Integration-Chat Plugin ], select the plugin you want to install from the list and copy its code;
•Or in the operation area on the right side of the plug-in you want to install, click Edit Plug-in > Integrate/Install > find the Customer Service Plug-in installation location, where you can also view the code.
2.2 Paste the code
Hint
After copying the code, go to your site to install SaleSmartly. It is recommended to find a development engineer to complete this step.
After accessing the server where the site is hosted, find the file containing the tag (usually index; please consult the site's development engineer for details), open the file, paste the JavaScript code before the tag, sand ave the changes, and the installation will be successful.
Vue framework introduces JavaScript code example
- Place it in the index.html file of the project (the file location may be different)
React framework introduces JavaScript code example
- Place it in the index.html file of the project (the file location may be different)

HTML file introduces JavaScript code example
- Place it in the index.html file of the project (the file location may be different)

Uni-app framework introduces JavaScript code examples
Uni-app does not support installing chat plugins |
PHP import JavaScript code example
- Place it in the index.html file of the project (the file location may be different)

- Effect display
Angular introduces JavaScript code example
- Place it in the index.html file of the project (the file location may be different)
2.3 Demo
- Please visit: Click to jump
3. Frequently Asked Questions
3.1 Install the chat plugin to optimize web page loading speed
The SaleSmartly chat plugin itself does not affect your website's loading speed. If your website is loading slowly, you can try the following methods:
(1) Use defer (recommended)
In your HTML file, use:
html
<script src="https://.../js/project_xxxxx_xxxxx_xxxxxxxx.js" defer></script>
(2) When using async
The script loads and executes without blocking HTML parsing, but the execution order is not guaranteed:
html
<script src="https://.../js/project_xxxxx_xxxxx_xxxxxxxx.js" async></script>
(3) Load the SDK after all page resources are fully loaded
The SDK may load more slowly in this case:
javascript
window.addEventListener('load', () => {
// Manually load the SDK here
});
(4) Load the script on demand
💡 Tip: Insert the script manually when needed.