Pop-up keeps re-appearing
-
After the visitor dismisses the pop-up, it re-appears whenever they go to a different page in my website. How can I keep the pop-up from re-appearing as long as the visitor stays on the website?
-
Hi @buddha35,
Sure, I will be happy to assist you in resolving your issue with the popup reappearing on different pages on your website.
Could you please share your website URL with us, so I can further investigate and resolve your issue?
Such issues are caused by accidentally enabling the Exit-Intent trigger.
See here: https://divimode.com/knowledge-base/popups-appear-without-clicking-anywhere/- You can open up the Visual Builder to edit the Popup.
- Open the Settings-Modal of the Section (the gear icon).
- Head over to the “Popup” tab.
- Open the section “Behavior”.
- Set the option “Enable Exit Intent” to “NO.”
- Problem solved! Save the page and test the Popup.
I hope this helps; I will be looking forward to your response. Please do not hesitate to ask any further questions. Thank you.
Thanks Rohit.
The website is https://santaonline.net. The option to “Enable Exit Intent” is already set to “No”. The pop-up automatically appears on each new page visited after about 5 seconds.
This was set up for me by someone else. Not sure what to try next.
Hi @buddha35,
Sure, I will investigate further and assist you in resolving your issue.
Issue
I checked and confirmed your issue.
See here: https://share.zight.com/KouN15eo
Observation
As you can see in the shared screen recording above, when I verified each page using our internal tool, I found that every page has an active popup [ON-PAGE-POPUP – #offer].
Your page “The Mail Roon” (https://santaonline.net/the-mail-room/) has two popup, one the common across every page (#offer) and another “ON-PAGE-POPUP – #dynamic-area-1”.
When I checked your second popup (#dynamic-area-1) I found it was the same as the first popup (#offer).
See here: https://share.zight.com/kpuRWrNp
Popup Placement
Could you please confirm if you are utilizing the Divi Theme Builder Template for your designed popup? Or have you added the popup on every page?
Active Custom Trigger
I see that you have added the custom code to trigger the popup automatically after every second. And the same has been place in your header section.
See here: https://share.zight.com/YEuzWYnO
Added within the Code Integration Section (Divi > Theme Options > Integration > Code Integration > Add code to the < head > of your blog).
Divimode Reference
See here: https://divimode.com/knowledge-base/can-i-display-a-popup-instantly-when-a-page-is-loaded/#popups-for-divi
Solution
You can remove the code that triggers the popup from the header section and instead add it through a code module to the specific page where you want the popup to trigger automatically. This will ensure that the popup only appears on the desired page.
I have demonstrated how to add the same code via the code module within your popup section.
See here: https://share.zight.com/4guReE0z
Let me know about the progress. I will be looking forward to your confirmation. Thank you.Hello @mrrohitbhardwaj,
I’m the developer who helped @buddha35 set this up on the site.
Yes, we did add the popup to the global theme builder. It’s in the header so it appears on every page. We’re using a code snippet in the header which triggers the popup after 6 seconds.
We want the popup to appear on every page, and we want it triggered after 6 seconds. However we want a cookie or localstorage to recognize when a visitor closes it, so it’s not shown to them multiple times on one session. Is there a custom code snippet to function that can accomplish this?
Hi @reelboldmedia,
Sure, I will be happy to assist you with cookies or local storage to recognize when a visitor closes your popup.
You can utilize our JS API > JS Functions.
DiviArea.Utils.setCookie() – Set the value of a cookie, with an expiration date.
See here: https://divimode.com/knowledge-base/js-divi-area-utils-set-cookie/
DiviArea.Utils.getCookie() – Return the value of a cookie.
See here: https://divimode.com/knowledge-base/js-divi-area-utils-get-cookie/
applyFilters( “set_data” ) – Filters a value that will be written to a Cookie or the localStorage.
See here: https://divimode.com/knowledge-base/js-filter-set-data/
applyFilters( “get_data” ) – Filters a value that was just read from a Cookie or the localStorage. When no value exists (or it expired), the value is set to boolean false.
See here: https://divimode.com/knowledge-base/js-filter-get-data/
applyFilters( “set_data_expire” ) – Filters the lifespan of a local data entry. This will directly influence the Cookie expiration date or the internal expiration timestamp of localStorage entries.
See here: https://divimode.com/knowledge-base/js-filter-set-data-expire/
DiviArea.Utils.setLocalData() – Save the given information for a specified number of minutes in the current browser.
See here: https://divimode.com/knowledge-base/js-divi-area-utils-set-local-data/
The DiviArea.Utils.setLocalData() method will decide, whether to write a Cookie or to save data to the localStorage instead.
If you need more help with a custom code solution, you can upgrade to premium support. With premium support, you’ll receive developer priority assistance to resolve any issues with the solution from our development team.
To avail of premium support, switch to Divi Areas Pro. Popups for Divi is a lighter version of Divi Areas Pro. Divi Areas Pro offers top-notch support and unlocks a wide range of features, triggers, behaviors, and integrations.
Plus, your license key has unlimited activations, allowing you to use it on any website of your choice. Install and utilize it on as many websites as you want without any restrictions on downloads or installations.
However, please note that you are the only person who is permitted to use the license key. You are now allowed to make your license key available to other people.
You can find information about Divi Areas Pro below.
See here: https://divimode.com/divi-areas-pro/
I hope this helps. Please do not hesitate to ask any further questions. Thank you.@mrrohitbhardwaj Thank you kindly for that direction, it was very helpful! I was able to put together a snippet to make this work. For anyone else who has this issue, here’s what we’re using:
<script> (function () { DiviArea.addAction('ready', function () { var popupId = 'offer'; // TODO: ← Enter the ID of your Popup here! var popupClosedCookie = DiviArea.Utils.getCookie('popup_closed_' + popupId); // Only show the popup if it hasn't been closed in this session if (!popupClosedCookie) { window.setTimeout(function () { DiviArea.show(popupId); // When the popup is closed, set a cookie to prevent it from showing again DiviArea.addAction('hide_area', function (area) { if (area.attr('id') === popupId) { // Set a cookie that expires in 30 minutes (or however long you want the session to last) DiviArea.Utils.setCookie('popup_closed_' + popupId, 'yes', 30); } }); }, 6000); } }); })(); </script>
Hi @reelboldmedia,
I appreciate your confirmation and helping the community by sharing the custom code solution to the issues you have been encountering.
Please do not hesitate to ask any further questions. Thank you.
- The topic ‘Pop-up keeps re-appearing’ is closed to new replies.