[Hustle] Custom visibility rule

Is the number of the times visitor has seen the popup (which is absolutely useless)

Is there any way to make a custom visibility rule, similar to “Number of times visitor has seen”, but for the number of pageviews, instead of rhe popup views?

So that the user only sees the popup after a certain amount of visits.

  • Panos
    • SLS

    Hi Alex Mago ,

    Interesting request :slight_smile:

    I have prepared some custom snipped as a workaround, but it doesn’t cover the “Between” views count case. If you want to try it out, you can download the zip from here
    https://gist.github.com/wpmudev-sls/5ac750e1d343de4c811783085ab26e86
    unzip it and upload file hustle-pageviews-rule.php to your wp-content/mu-plugins folder. You can create that folder if it doesn’t exist. Alternatively you should be able to install it as a normal plugin, but you would need to zip that php file (original zip file won’t be recognized as a plugin ).

    I would strongly recommend to first try it out in a staging/testing site.

    If this is close to what you need, I could try change it to accept a range as a “Between” part.

    Kind regards!

  • Panos
    • SLS

    That’s weird, it worked in my tests, also tested again just now and was working fine. Could you share a screenshot with the visibility options you set there? I’d like to test specifically what you tried out to see if there is some specific option that won’t work.

    Also, just in case, could you clarify a bit more when the popup should show?

    Thanks!

  • David @ BBS
    • Site Builder, Child of Zeus

    Hi Panos
    Hope your year is going very well. I’m trying to create a custom Visibility Condition for Hustle Pro. I was able to create the new Condition option using the ‘hustle_visibility_condition_options’ filter, I’ve setup custom variable data using the ‘hustle_optin_vars’ filter, and even created the template using the ‘hustle_visibility_condition_templates’ action. I followed your tutorial regarding adding jQuery( document ).on( "hustleAddViewConditions"... using ‘admin_footer’. But this doesn’t seem to work. Even with your above code, I’m able to see Pageviews as an option and select it. But it never renders the template to adjust the settings.

    Can you take a look at your code and provide suggestions on how to make this work?

    Thanks!
    David

  • David @ BBS
    • Site Builder, Child of Zeus

    Hi Patrick,

    Sure I’m happy to create a new ticket. Having said that, it looks like the original poster’s request was resolved, thus why I thought it would make sense to revive this thread for continuity’s sake should anyone in the future be searching for this.

    David