Prevent Landbot from loading in mobile browsers

Pau Sanchez Updated by Pau Sanchez

Due to design or speed, we might want to avoid Landbot being displayed and loaded in Mobile devices, here is a sample code to do that:

document.addEventListener('DOMContentLoaded', function() {
let checkMobile = (/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(navigator.userAgent)) ? true : addLandbot(); }); function addLandbot(){
var scriptstatic = document.createElement("script");
scriptstatic.src = "";
scriptstatic.onload = function() {
var script = document.createElement("script");
script.type = "text/javascript";
var code = document.createTextNode(`
var myLandbot = new Landbot.Livechat({
configUrl: '',
} </script>

Just change the url of the "configUrl" for the one assigned to your bot:

configUrl: '',

Change only this part H-1234-XXXXX , you will find your in the Share Section:

How did we do?

Two-Step Email Verification

How to not display Proactive Message to repeating Visitors