• I had earlier requested for a feature to hide some widget on mobile screen I don’t know the status of that feature but I hope someday I may see it in Jetpack. I would like to request another feature which shows widgets based on visitor’s country (IP address). This feature will help to show affiliate links of only those websites who ship to that country.

    https://www.ads-software.com/plugins/jetpack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Thanks for the feedback.

    How do you imagine the option to work? Should we add a new input field to the visibility options, allowing you to enter multiple IP addresses?

    Thread Starter Anand Dudheliya

    (@anand135)

    We can use api services like https://freegeoip.net/ to get the country of the visitor and there should be a an input system like we have for tags where all the countries are stored in database for visibilty setting.
    And if the api provider’s server is down or we have reached the maximum amount of api calls we can have a fallback function which uses HTML5 Geolocation API.

    Another way is to use database of ip address and their location

    I did not get the point of entering multiple IP addresses.

    I don’t know if it’s the best way but I have written how I have imagined this to work.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Thanks for the extra details.

    Jetpack’s Widget Visibility module doesn’t have any way of grabbing the user’s IP address at the moment, and I’m not sure that’s something we’d want to add to the module. It would also require a new interface to input different countries, and could be problematic on sites that use caching plugins, since the widget would be cached and displayed to you regardless of your location.

    If you’re interested in the feature, I’d suggest looking at the existing Widget Visibility code and developing your own Jetpack add-on to add this feature. If that works, feel free to submit a Pull Request and we’ll consider adding the add-on to Jetpack itself:
    https://github.com/Automattic/jetpack

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature Req:Widget Visibility Based on Viewers Country’ is closed to new replies.