Specific Use- Cases

How to show Messenger Opt-in only on iPhones ( all browsers) ?

Steps to follow:

  1. Complete the Messenger setup process

  2. The following piece of code needs to be placed before the tag of all website pages to achieve the desired outcome.

<script>
function isIOS() {
var iOS = /iPhone/.test(navigator.userAgent) && !/iPad/.test(navigator.userAgent) && !window.MSStream;
    return iOS;
}
if (isIOS()) {
    window._izq = window._izq || []; window._izq.push(["init"]);
} else {
    window._izq = window._izq || []; window._izq.push(["init", {"messengerAutoPrompt": false}]);
}
</script>
<script src="https://cdn.izooto.com/scripts/******.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

Inline #12, replace the stars with hash js corresponding to your iZooto ID.
You can find the Hash.js on the iZooto Panel under settings.

❗️

Important

The iZooto JS needs to be placed only once.


Did this page help you?