Add a checkbox widget to your Privy promotion to increase opt-ins!

Add your Facebook Messenger widget to your Privy promotion to increase opt ins and allow you to create flows to target users higher in the funnel! Add the widget as an addition to your email capture campaign and incentivize opt-ins while collecting email addresses at the same time! Or, replace your email capture with a Messenger opt-in. 

Step One: Integrating the ShopMessage widget with Privy

Select the Privy campaign that you would like to use for your ShopMessage opt in and click on the Design tab. From there click on Click to edit next to Popup Design.

In the design editor, click on Add Element and choose Add HTML. 

A small text window will appear on your campaign preview and an editor will appear on the left hand side of your screen.

Enter the following code snippet in the editor the left hand side. Please note you will leave the text in green (<p>,</p>). 

<div id="shopmsg-privy-checkbox" prechecked="false" data-required-to-proceed="true" data-warning-text="Click this or else..." style="background:#E8F0F8;width:280px;height:70px;margin:0 auto;text-align:center"></div>

Then click on Save. Please note that you will not be able to see a preview of the checkbox widget, but it will display on your site once your integration in live. 

Step Two: Customizing Your Checkbox Settings

You may edit the sections of the code that are in bold below. Here's what how making edits will customize your integration. 

<div id="shopmsg-privy-checkbox" prechecked="false" data-required-to-proceed="true" data-warning-text="Click this or else..." style="background:#E8F0F8;width:280px;height:70px;margin:0 auto;text-align:center"></div>

  • Decide whether your widget should be pre-checked.
    pre-checked="false"  will display your checkbox as unchecked. pre-checked="true" will display your pre-check as true. **This is only possible if you already have the pre-check feature. 
  • Decide if your users MUST complete this form to proceed to your site.
    data-required-to-proceed="true" will make it so that users must check the checkbox to subscribe. data-required-to-proceed="false" will turn this setting off. 
  • Update your Messenger opt in text.
    Within the . data-warning-text="Click this or else..." , change the the "Click this or else..." text to any opt in messaging that you would like.

Step Three: Turn Your ShopMessage Integration Live

Navigate back to the Design Tab of your campaign and click on Click to edit next to Audience Targeting.

This option will expand, allowing you to create a new condition. Add the following condition. 

  • Property: Choose Custom Javascript
  • Operation: Choose satisfies and add the following code snippet to the text field.
(function(d, s, id){
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "https://cdn.shopmsg.me/v1.0/shopmsg_privy.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'shopmsg-privy'));
return true;

Then, click on Save changes. 

Additional Notes

You will need to be on a Privy Commerce plan or higher to complete the ShopMessage Privy integration. 

Did this answer your question?