Switch Olark to Chatlio
This commit is contained in:
parent
1a137ee7b3
commit
75e8af47e5
3 changed files with 10 additions and 23 deletions
|
@ -157,8 +157,8 @@ class DefaultConfig(object):
|
||||||
# Feature Flag: Whther Dex login is supported.
|
# Feature Flag: Whther Dex login is supported.
|
||||||
FEATURE_DEX_LOGIN = False
|
FEATURE_DEX_LOGIN = False
|
||||||
|
|
||||||
# Feature flag, whether to enable olark chat
|
# Feature flag, whether to enable support chat
|
||||||
FEATURE_OLARK_CHAT = False
|
FEATURE_SUPPORT_CHAT = False
|
||||||
|
|
||||||
# Feature Flag: Whether to support GitHub build triggers.
|
# Feature Flag: Whether to support GitHub build triggers.
|
||||||
FEATURE_GITHUB_BUILD = False
|
FEATURE_GITHUB_BUILD = False
|
||||||
|
|
|
@ -211,7 +211,7 @@ def render_page_template(name, route_data=None, **kwargs):
|
||||||
google_tagmanager_key=app.config.get('GOOGLE_TAGMANAGER_KEY', ''),
|
google_tagmanager_key=app.config.get('GOOGLE_TAGMANAGER_KEY', ''),
|
||||||
sentry_public_dsn=app.config.get('SENTRY_PUBLIC_DSN', ''),
|
sentry_public_dsn=app.config.get('SENTRY_PUBLIC_DSN', ''),
|
||||||
is_debug=str(app.config.get('DEBUGGING', False)).lower(),
|
is_debug=str(app.config.get('DEBUGGING', False)).lower(),
|
||||||
show_chat=features.OLARK_CHAT,
|
show_chat=features.SUPPORT_CHAT,
|
||||||
aci_conversion=features.ACI_CONVERSION,
|
aci_conversion=features.ACI_CONVERSION,
|
||||||
has_billing=features.BILLING,
|
has_billing=features.BILLING,
|
||||||
contact_href=contact_href,
|
contact_href=contact_href,
|
||||||
|
|
|
@ -240,26 +240,13 @@ mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
{% if show_chat %}
|
{% if show_chat %}
|
||||||
<!-- begin olark code -->
|
<script type="text/javascript">
|
||||||
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
|
window._chatlio = window._chatlio||[];
|
||||||
f[z]=function(){
|
!function(){ var t=document.getElementById("chatlio-widget-embed");if(t&&window.ChatlioReact&&_chatlio.init)return void _chatlio.init(t,ChatlioReact);for(var e=function(t){return function(){_chatlio.push([t].concat(arguments)) }},i=["configure","identify","track","show","hide","isShown","isOnline"],a=0;a<i.length;a++)_chatlio[i[a]]||(_chatlio[i[a]]=e(i[a]));var n=document.createElement("script"),c=document.getElementsByTagName("script")[0];n.id="chatlio-widget-embed",n.src="https://w.chatlio.com/w.chatlio-widget.js",n.async=!0,n.setAttribute("data-embed-version","2.1");
|
||||||
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
|
n.setAttribute('data-widget-id','b65028b3-f2f1-4cba-6e93-2aa66990e3e4');
|
||||||
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
|
c.parentNode.insertBefore(n,c);
|
||||||
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
|
}();
|
||||||
0:+new Date};a.P=function(u){
|
</script>
|
||||||
a.p[u]=new Date-a.p[0]};function s(){
|
|
||||||
a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
|
|
||||||
hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){
|
|
||||||
return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){
|
|
||||||
b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{
|
|
||||||
b.contentWindow[g].open()}catch(w){
|
|
||||||
c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{
|
|
||||||
var t=b.contentWindow[g];t.write(p());t.close()}catch(x){
|
|
||||||
b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()})({
|
|
||||||
loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
|
|
||||||
/* custom configuration goes here (www.olark.com/documentation) */
|
|
||||||
olark.identify('1189-336-10-9918');/*]]>*/</script><noscript><a href="https://www.olark.com/site/1189-336-10-9918/contact" title="Contact us" ng-safenewtab>Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
|
|
||||||
<!-- end olark code -->
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if google_tagmanager_key %}
|
{% if google_tagmanager_key %}
|
||||||
|
|
Reference in a new issue