医院网站建设

当前位置: > 医院网站方案 > 运营推广 >

关闭商务通按返反键时显示继续沟通拨打电话的对话框是怎么实现的

发布时间:2019-01-07 作者:医院网站制作 关键词: 商务通对话框 快商通对话框
经常有医疗网络部的主管跟我抱怨对话转化越来越差,顾客点了咨询没说两句话就走了,竞价成本越来越高,有没有什么办法可以降低一些对话的跳出率,增加一些用户的停留时间和留电呢?
答案是有的,今天我把我的操作整理了一篇文章,文章里写的软件是商务通,快商通或者其它聊天软件同样适用本代码。
在您的网站目录里建一个js文件
/swt/fahui.js
粘贴以下内容,注意tel:后面的电话号码要替换成您单位自己的号码,这样客户才会联系到您
document.writeln("<style>#fc2018{width:17rem;height:6rem;position:relative;position:fixed;z-index:1;background-color:#F9F4FA;margin:auto;left:0;right:0;top:0;bottom:0;-moz-box-shadow:0 0 30px #888;box-shadow:0 0 30px #888;border-radius:5px;overflow:hidden;display:none}.fc20181{width:100%;height:2.2rem;text-align:center;line-height:1.2rem;font-size:.6rem;padding-top:1.8rem;}.fc20181 span{font-size:.9rem;color:#cf2523;padding-top:1.8rem;}.inpt{width:100%;height:2rem;position:relative}.inpt span{height:2rem;float:left;display:block;text-align:center;line-height:2rem}.inpt span:nth-child(1){width:33.3%;background:#6E99CC;color:#fff;text-align:center;border-left:0% #fff solid;position:absolute; left:0%; bottom:0;top:1.8rem}.inpt span:nth-child(2){width:33.3%;background:#D52B73;color:#fff;text-align:center;border-left:0% #fff solid;position:absolute; right:33.3%; bottom:0;top:1.8rem}#fc2018 a{width:33.3%;height:2rem;text-align:center; line-height:2rem; color:#fff;position:absolute;bottom:0;right:0;background:#6E99CC;z-index:99;display:block;}</style>");
fanhui="<div id=fc2018>  <div class=fc20181><span>是否已经解决了您的疑问?</span></div><div class=inpt><span>已解决</span><span>继续沟通</span></div><a href=\"tel:换成您单位的电话\">电话沟通</a></div>";
var _thisDiv=document.createElement("div");
_thisDiv.innerHTML=fanhui;
document.getElementById("mainContent").appendChild(_thisDiv);
var worrying = document.getElementById("fc2018"),
            inpt1 = document.getElementsByClassName("inpt")[0],
            inpt = inpt1.getElementsByTagName("span");
        inpt[1].onclick = function() {
            pushHistory();
            worrying.style.display = "none";
        }
        inpt[0].onclick = function() {
            window.opener=null;
			window.open('','_self');
			//window.close();
			window.history.back();
        }
        pushHistory();
        window.addEventListener("popstate", function(e) {
            worrying.style.display = "block";
        }, false);

        function pushHistory() {
            var state = {
                title: "title",
                url: "#fh"
            };
            window.history.pushState(state, "title", "#fh");
        }
请将这个文件保存之后使用ftp上传到您的网站服务器上。
在商务通里,请点击嵌入以下脚本代码,通常只嵌入到移动端,因为目前来讲大约80%以上的优质流量来源于移动端。
<script type="text/javascript" src="您的域名/swt/fahui.js"></script>
保存就可以了。注意脚本前方的域名一定要替换成您自己的域名

这时候,您可以打开手机端浏览器,点击商务通测试一下,尝试一下点击商务通的关闭按钮和返回按钮

将为弹出一个非常友好的对话框,吸引顾客接着咨询,或者拨打电话,有效降低了对话的跳出率。

如果您有幸看到这篇文章,有不懂的地方,可以随时跟我沟通,希望能够帮助到您,我的网站上有我的联系方式。

 
责任编辑:医院网站制作
运营推广
医院网站设计
使用技巧
调试安装
运营推广
扫码咨询
医院网站建设