How to integrated Olark live chat for a Android/iOS Capacitor app?

I’m trying to add Olark live chat to my cross platform Android/iOS Capacitor + Svelte app.

The Olark installation instructions for web are to add this code before </body> on each page where you want the widget to appear:

<!-- begin olark 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");
/* custom configuration goes here (www.olark.com/documentation) */
olark.identify('API_KEY');</script>
<!-- end olark code -->

Adding this block to Index.html (or inside the <script> of any Svelte components) works as expected for the Capacitor web app, but the widget doesn’t show up in the Android or iOS apps. Do you all have any suggestions for what to try or how to debug this?

I’m open to alternative products, but Olark is simple, affordable, and has exactly what I need. I was able to get the Intercom plugin working for Android/iOS (web is not supported), but Intercom is cost prohibitive and total overkill for what I need.

Previous related topics didn’t go anywhere, so I think the community would benefit from a good solution and some simple instructions for a simple drop-in chat widget: