• Resolved dlishdesign

    (@dlishdesign)


    Is there an option to set how many times a popup will appear for a specific user? After reading http://docs.wppopupmaker.com/article/165-using-triggers-and-cookies-together , I can’t seem to figure this out. I’m trying to show two different popups on the home page that show a max of one time a day (I’ve figured this portion out with setting the cookie time to 1 day) but in addition to this, I’d like to set up a max views to 10 so that even if the user visits the home page one time each day for 10 days, that user won’t see the popup again because they’ve seen the popup 10 times. Is this possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @dlishdesign

    I’m not sure if this would be possible or not, but if it is, it would require some custom code.

    I will have our Lead Dev @danieliser take a look as soon as he is available and give his thoughts.

    Thanks for your patience.

    Plugin Author Daniel Iser

    (@danieliser)

    @dlishdesign – Cool idea, would be simple to do by tapping into the analytics hooks and keeping a count in wp_options or post meta. Once it hits your limit then set the post status to draft would suffice.

    Can’t say it would get added to the core, but could easily be worked out with a hooked function.

    Thread Starter dlishdesign

    (@dlishdesign)

    How can we make the max views specific to the user? Don’t want it to go into draft mode because then it would disable viewing it for others. Want to set the max views for individual users. Could we use the analytics piece to track a specific user then when they reach the max view count, a cookie is set for 10 years just for that user?

    Plugin Author Daniel Iser

    (@danieliser)

    @dlishdesign – Sorry for the delay. Ok so the only way this would work is to use custom JS at the current time.

    Essentially your JS would need to do the following:

    – Check for and set a counter cookie. Increase it once each time the popup is shown.
    – Then use one of several prevention methods we have in JS to prevent the popup from triggering again.

    In fact v1.4.19 & v1.4.20 will help greatly with that. v1.4.19 added JS based conditions functionality, v1.4.20 added some Action/Filter functions in JS that we are using in a few places that you could take advantage of.

    Once the counter > limit you can add another cookie like pum-13-never-again and then have your popup triggers look for that cookie. This will permanantly disable it if you set a long cookie time like 10 years.

    Hope that helps. Glad to help with the JS.

    Closing this ticket due to inactivity. If you’re still having an issue, create a new thread, link this one, and we will continue troubleshooting.

    Please take a moment to rate and review the plugin and or support.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Set a max views variable on popup’ is closed to new replies.