Delay Loading Intercom
Can I delay loading Intercom on my site to reduce the JS load? i.e. only load it after a page is fully loaded for a visitor?
You can modify the Intercom load function by splitting it out like this, and it runs inside a setTimeout
function.
The difference is that the part that runs l()
normally is onLoad
and that gets stuffed up after the setTimeout
.
You can also strip out the l()
function entirely if you like (and just have the variables declared etc) and just run it, as it’ll be wrapped in a setTimeout
function.