FB Opt-in Checkbox Promotion triggered by ShopMessage

Using our custom javascript code to leverage ShopMessage as a way to tell if a user is a good candidate for FB messenger opt-in, or not.

Introduction

For clients seeking to target customers who are logged into facebook: we have a solution for you. Basically, if customers are logged into their facebook accounts, we can use this as a trigger for the facebook messenger optin promotion. This custom Javascript code is a way to utilize Shop Message to know if the user is a good candidate for a facebook messenger optin promotion, or not. The code will fire the promotion when they are logged into Facebook but have yet to opt-in.  Most Justuno/Shopmessage clients will want to show Justuno's promo with the Shop Message plugin installed if that value is true.  Although some clients may choose to show the Shop Message popup without this check.

A great example is to show a Justuno promo with a ShopMessage facebook checkbox or Opt-in CTA if this code is equal to true.  Then, if the value is equal to false you could show an email opt-in promo instead.

Evaluate Javascript {code} is equal to true

After creating your facebook messenger optin promotion, copy and paste the code into your advanced ruleset. Once you've added the code within the ruleset you should be able to leverage shop message with Justuno.  

window.ju_fbCheck||"undefined"==typeof _shopmsg||(window.ju_fbCheck=!0,
setTimeout(function(){window.ju_fbLoggedIn&&!window.ju_fbOptIn?window.ju_fbOptInReady=!0:
window.ju_fbOptInReady=!1},4e3),_shopmsg("facebook.loginStatus",function(n)
{window.ju_fbLoggedIn=n}),_shopmsg("visitor.optinStatus",function(n)
{(window.ju_fbOptIn=n)&&(window.ju_fbOptInReady=!1)})),window.ju_fbOptInReady;

 

Advanced Ruleset: targets area to paste article code for Javascript evaluation


Visit Justuno @ justuno.com