First, you need to start by adding the campaign javascript snippet in your website. You need this in every page where you will add the widgets for this campaign.
This code should go near the closing </body> tag.

Edit your page in Leadpages and from the left sidebar click Page Tracking and Analytics:

Paste the following script at the section Immediately before the closing  tag:

<script>!function(a,b,c,d,t){var e,f=a.getElementsByTagName("head")[0];if(!a.getElementById(c)){if(e=a.createElement(b),e.id=c,e.setAttribute("data-vrlps-ucid",d),e.setAttribute("data-vrlps-version","2"), e.setAttribute("data-vrlps-template", t),e.src="https://app.viral-loops.com/popup_assets/js/vl_load_v2.min.js",window.ub){jQuery=null,$=null;var g=a.createElement(b);g.src="https://code.jquery.com/jquery-2.2.4.min.js",f.appendChild(g)}f.appendChild(e);var h=a.createElement("link");h.rel="stylesheet",h.type="text/css",h.href="https://app.viral-loops.com/static/vl-loader.css",f.appendChild(h);var i=a.createElement("div");i.id="vl-overlay",i.style.display="none";var j=a.createElement("div");j.id="vl-loader",i.appendChild(j),a.addEventListener("DOMContentLoaded",function(b){a.body.appendChild(i);for(var c=a.getElementsByClassName("vrlps-trigger"),d=0;d<c.length;d++)c[d].removeAttribute("href"),c[d].onclick=function(){a.getElementById("vl-overlay").style.display="block"};var e=a.querySelectorAll("[data-vl-widget='popupTrigger']");[].forEach.call(e,function(b){var c=a.createElement("div");c.className="vl-embedded-cta-loader",b.appendChild(c)})})}}(document,"script","vrlps-js","YOUR_CAMPAIGN_ID","sweepstake");</script> 


Make sure to replace YOUR_CAMPAIGN_ID with your campaign ID that you can find in the Installation step of your Campaign Wizard.


Then select Save.

Afterwards, you need to create a trigger to open the popup of Viral Loops.

To do that, you need to go to the left corner, select "Widgets" and drag + drop the HTML icon in your page. 

Like so:


When you add your widget, you just have to click on it and add the following code:

                             <div data-vl-widget="popupTrigger"></div> 

Like so:


Select save!


Finally, you'll just have to publish your page and you're ready to go!

Did this article help you? Let us know!


Did this answer your question?