Note that in order to highlight the reception source code, the demo page deliberately only retains the customer service part. If you want to see the effect of integrating it into the website, you can visit http://aspcms.kelubo.net
This source code contains an independent database and can be run independently, but its main purpose is to be connected to your website to implement WeChat online customer service functions.
After the website is connected, you can achieve:
1. When a visitor visits the website, the WeChat mobile phone will immediately receive a notification that someone has visited the website. Click to actively greet the visitor immediately;
2. When a visitor actively initiates a consultation, the customer service will be notified immediately on WeChat, and the customer service can immediately establish a dialogue with the visitor;
3. Record the visitor’s source URL and footprints on this site, and record the number of visitor visits.
Configuration tutorial
1. Follow the public account [一公] on WeChat, member center - webmaster code column to register your website domain name and obtain id and openid
2. This source code must be accessed using a domain name. It is not suitable for localhost or IP access testing because the WeChat port will not be able to access your URL correctly.
3. Visit this source code admin.asp, fill in your website domain name and the ID and openid obtained above, the system will automatically write the corresponding data to the database and kfid.asp file
4. Visit index.html to see the effect demonstration.
Integrated website tutorial
1. Place this source code folder in the root directory of your website to ensure that your domain name/kf can be accessed
2. Reference the head.html file to the page that requires customer service functions, or copy the code of the page to your header or footer file
3. Line 11 of head.html must be changed to your own ID number.
4. Remember not to modify any URL containing wx.kelubo.net in the source code. This is the interface.
aspcms kernel integration method
1. Add a reference to kfid.asp to the page header in the root directory /inc/AspCms_Mainc-lass.asp file, and add the global definitions of kfid and yuming below for calling the template static file head.html
2. Add the call to head.html in the template file
logical explanation
1. When a visitor visits index.html or a page containing head.html, the visitor’s source URL, IP, location city, current URL and other information are automatically obtained, and an identification code (stored in Cookies) is assigned, and ajax is submitted to the background file jilu.asp , if the visitor identification code already exists, the last visit time will be updated and the footprint record will be added. If it does not exist, a new visit record will be created and a new visitor visit notification will be pushed to the customer service. Customer service will not be notified within 24 hours of the return visit of the old visitor. If necessary You can modify it yourself and you will be notified if you visit again within a few hours.
2. A reply window will automatically pop up after the visitor has been on the page for 1 minute (the time is set in the shangqiao.js file)
3. Every 5 seconds, the visitor’s online status is updated for website customer service to identify whether the visitor is offline.
4. When a visitor initiates a consultation, ajax is submitted to the jilu.asp page without refreshing, so that the consultation page can be displayed without refreshing and the record can be saved and pushed to the customer service WeChat.
Front-end web interface
Customer service mobile interface
Backend management interface