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.setAttribute("data-vrlps-ucid",d),e.setAttribute("data-vrlps-version","2"), e.setAttribute("data-vrlps-template", t),e.src="",window.ub){jQuery=null,$=null;var g=a.createElement(b);g.src="",f.appendChild(g)}f.appendChild(e);var h=a.createElement("link");h.rel="stylesheet",h.type="text/css",h.href="",f.appendChild(h);var i=a.createElement("div");"vl-overlay","none";var j=a.createElement("div");"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']");[],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?