I followed the HTML Async Basic Integration example here: HTML Async | Basic Integration
I placed the following right above the </body> tag:
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : <my 8 digit id>
};
/* End of Configuration */
/* LP Mobile JS include */
(function(){var a=_LP_CFG_.lpjsid="lpjs-"+(new Date).getTime(),b=document.createElement("script"),s=document.getElementsByTagName("script")[0];b.id=a;b.type="text/javascript";b.async=true;b.src="https://d3tpuxked45kzt.cloudfront.net/lp_lib/liveperson-mobile.js";s.parentNode.insertBefore(b,s)})();
/* End of Include */
</script>
I'm using a local environment so am loading the site using iOS Simulator and I keep seeing the following error in console:
XMLHttpRequest cannot load https://dispatch.look.io/api/v1/visit/launch. Origin <mylocalsite> is not allowed by Access-Control-Allow-Origin.
I tried modifying my vhosts file to add Header set Access-Control-Allow-Origin "*", however am still seeing the same issue.
Is the error a result of LivePerson not accepting the app_id? Our account not being enabled for mobile chat?