25 October, 2019
Лже Артемий
Popup for converting leads

In October 2019 on OctoberCMS Marketplace appeared a plugin for simple but popular feature - popup for leads converting. Leads Popup Convertor by IbsellNET.

It allows easily add one or several popups to your site. Popup content is editable from backend but also you can choose from few appearing types. 

  • show popup in N seconds after page is loaded
  • on click button event
  • before user closes the tab/page

For the first 2 types you can specify seconds and button id.

That's it.

Also I want to share my receipt for the case, when we need to show popup only after some period we've shown it first time already. 

In this example popup appears after page is refreshed again only if 1 hour passed. You need to create /partials/Popupconvertor/default.htm where you copy the code from plugin's components dir default.htm file. Then add this snippet closing the section showing popup into if statement:

var date = new Date();
date.setHours(date.getHours() - 1);
var dateStr = date.getTime();

if (localStorage.getItem('pop_date_shown') < dateStr) {
var dateNew = new Date();
var dateNewStr = dateNew.getTime();

localStorage.setItem('pop_date_shown', dateNewStr);
// the code showing popup
Просмотров: 576