-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgreeter.html
More file actions
69 lines (60 loc) · 4.48 KB
/
greeter.html
File metadata and controls
69 lines (60 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<head>
<title>How-To | Greeter</title>
<link rel="shortcut icon" href="C:\Users\doddm\Desktop\CS 290\olark.ico" />
<link rel="stylesheet" href="howto.css" type="text/css">
</head>
<body>
<div id="header">
<h1>Extend A Greeting!</h1>
<ul>
<strong><li><a href="index.html">Home</a></li></strong>
<strong><li><a href="attentionGrabber.html">Attention Grabber</a></li></strong>
<strong><li><a href="appearance.html">Appearance</a></li></strong>
<strong><li><a class="active" href="greeter.html">Greet Your Users</a></li></strong>
<strong><li><a href="combined.html">All Together</a></li></strong>
</ul>
</div>
<div id="container">
<h3>Greeter Settings</h3>
<p>
Another cool customizable feature of the chat box is the Greeter. You can write your own custom messages, set the the amount of time you'd like to wait before the message appears, and even define rules for your chatbox for how it behaves with new visitors and when it engages the user.
</p>
<br><br><li><strong>Enable the Greeter</strong></li>
<dd><br>
First off, you need to enable the Greeter for the specific page. Then you need to set the number of seconds you want the Greeter to wait until it prints the message. Finally, configure your own custom messages.
</dd>
<script async src="//jsfiddle.net/doddp/gzbnyhd6/embed/js/"></script>
<br><br><li><strong>Define Some Rules</strong></li>
<dd><br>
You can dive in a little deeper by defining rules for your chat box to follow. You might want the Greeter to greet only first time visitors. You also might only want to ask a visitor if they need help once per visit to the page. You can write your own JavaScript to make use of the functions provided <a href="https://www.olark.com/api#api.rules.defineRule">here</a> if you so choose. Below is a slightly modified example from <a href="https://www.olark.com/">Olark's</a> website of how you can modify the rules for your greetings, used on this page:
</dd>
<script async src="//jsfiddle.net/doddp/b7hfa7Ls/embed/js/"></script>
</div>
<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(){
f[z]=function(){
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
0:+new Date};a.P=function(u){
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.configure('WelcomeAssist.welcome_new_visitors', true );
olark.configure('features.greeter', true );
olark.configure('WelcomeAssist.welcome_delay_in_seconds', 5 );
olark.configure('WelcomeAssist.welcome_messages', ['This is a custom message.', 'Hello there! Custom messages are fun!',
'Thanks for visiting this How-To guide, how can I help you?']);
olark.identify('6854-997-10-1606');/*]]>*/</script><noscript><a href="https://www.olark.com/site/6854-997-10-1606/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
<script src="engage.js"></script>
<!-- end olark code -->
</body>
</html>