Opt-in Customisations

Trigger Prompt on selected pages

You can enable the Messenger Opt-in prompt on selected page categories e.g. Sports,Entertainment, etc.

All you need to do is set the value of messengerAutoPrompt:True in the <head> tag of your page. By default the value is set to false.

<script>
  window._izq = window._izq || []; window._izq.push(["init", {"messengerAutoPrompt": true}]);
</script>

📘

Note

You can also add a delay on the prompt by configuring it from the panel under Settings > Setup.


Trigger Prompt on button click

You can trigger the Opt-in when a user clicks on a button/link on your page.

if(Condition) {
  _izq.push(["triggerMessengerPrompt"]);//Triggers the Opt-in
}

Use Cases

I want my website visitors to be shown with a subscription opt-in only on a click of a button

Instead of showing an opt-in prompt on page load, you can trigger the prompt with the click of a button. This would help you in filtering your subscription base to the most loyal audience.

if(document.getElementById('EntertainmentButton').clicked == true) {
  _izq.push(["triggerMessengerPrompt"]);//Triggers the Opt-in
}

Did this page help you?