Closed ebrawer closed 1 year ago
Hey, at first thanks for using this :) In my Project I had the same and you will have this even if you natively inject the itercom javascript snippet. The Recommendation to use lazy-loading is a good hint. You can set the module option autoboot to false to prevent that the intercom boot and script injection is loaded at page load. Then you can trigger the intercom boot and also script injection via a custom button event listener
onClick: () => {
// Intercom lazy loaded
$intercom.boot({
custom_launcher_selector: '#mobile-intercom-launcher',
hide_default_launcher: true,
})
setTimeout(() => $intercom.show(), 500)
},
The setTimeout I had to not to show the intercom chat to early (when the script loading is not finished)
Async is already set. If you have any other good suggestions let me know
Will close this issue cause it can be lazy loaded by call boot() later on. Then async is already set. Feel free to recommend some solution or even contribute :)
The widget is currently causing 128 ms of MTB, which really hurts performance on https://pagespeed.web.dev
Can the loading be deferred?