I was implementing Olark live chat on my website and all I had to do is implement following js code.
<script type="text/javascript" async>
;(function(o,l,a,r,k,y){if(o.olark)return;
r="script";y=l.createElement(r);r=l.getElementsByTagName(r)[0];
y.async=1;y.src="//"+a;r.parentNode.insertBefore(y,r);
y=o.olark=function(){k.s.push(arguments);k.t.push(+new Date)};
y.extend=function(i,j){y("extend",i,j)};
y.identify=function(i){y("identify",k.i=i)};
y.configure=function(i,j){y("configure",i,j);k.c[i]=j};
k=y._={s:[],t:[+new Date],c:{},l:a};
})(window,document,"static.olark.com/jsclient/loader.js");
/* Add configuration calls below this comment */
olark.identify('XXXX-XXX-XX-XXXX');
</script>
I am wondering what technique uses Third Party JavaScript plugin like Olark, Disqus and similar companies?
As you can see olark.identify() is public available on my web page and you can find it with "inspect element". So how they handle security and bounce unwanted requests?
olark.identify('XXXX-XXX-XX-XXXX');