• Resolved lyonbeton

    (@lyonbeton)


    Hello,

    since a couple of week (last update?), I have an issue with geotargeting filters on my website (www.lyon-beton.com).
    All my plugins are updated to their latest version.
    I have a pop-up to kindly redirect US and Canadian citizens to a specific website (us.lyon-beton.com).

    Here is how I setup the filters :
    https://imgur.com/U5j00Im

    It worked perfectly.
    But since a couple of weeks, the pop up appears to every visitors, even if I load the page from France.
    I’ve checked my IP with https://tell-my-ip.com/detailed.html. It says that my computer is located in France.
    However I still have the popup displaying.
    Any idea on how to solve this issue ?

    thanks.
    franck.

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Damian

    (@timersys)

    Hi lyonbeton, the plugin cache the user location. In order to properly test it you need to clear all your cookies and session or enable debug mode by placing in wp-config.php the following:
    define('GEOT_DEBUG', true);

    Also be sure your popups are working in ajax mode if you use page cache.

    Regards

    Thread Starter lyonbeton

    (@lyonbeton)

    Hello Damian,
    thank you for your quick answer.

    I’ve done my tests with clearing all cookies, session data… with different browsers and in “private mode”.
    The ajax mode is turned ON.
    The result is the same. My website still open the pop up, thinking that I’m connecting from USA or Canada, even if it not suppose to. As if the display rules where not considered.

    Thread Starter lyonbeton

    (@lyonbeton)

    Hello,
    I still have the issue on my website.
    Am I the only one? Any idea on how to fix it?
    Tank you for your help.
    franck.

    Plugin Author Damian

    (@timersys)

    Hi franck if you add the display country shortcode to a page to see what country resolve? If the plugin is not resolving correctly your IP it could be to database file missing from plugin or your server not returning your real ip in the $_SERVER variable.

    You could create a php file to test that aswell.

    Thread Starter lyonbeton

    (@lyonbeton)

    Helo Damian,

    I’ve done this test.
    I use this shortcode on a page and the text appears:
    [geot country=”United States”] USA only content [/geot]
    I use this shortcode on a page and the text does not appear:
    [geot exclude_country=”United States”] Everyone except USA will see this [/geot]

    Looks like I’m considered as browsing from the USA.
    But when I check with https://tell-my-ip.com/detailed.html. It says that my computer is located in France.

    How can I check if a database file is missing from my plugin?
    Thanks.

    Thread Starter lyonbeton

    (@lyonbeton)

    Hello Damian,

    I’ve tried to uninstall and install again GeoTargeting lite Plugin.
    Since then, when I edit a pop up the dropdown list where it should displays countries is empty.
    See image here: https://imgur.com/a/HHRmC
    It may explain my first problem.
    What do you think?

    Plugin Author Damian

    (@timersys)

    the database is a .mmdb file located in includes/data folder.
    The countries you see in that dropdown are different database that lives in your mysql in the table geot_countries

    Try deactivating / activating the plugin again. Check for errors in your server log.

    IF not you will have to check the server variable as mentioned before.

    Regards

    Thread Starter lyonbeton

    (@lyonbeton)

    Hello Damian,

    I found nothing on my server log files.
    The .mmdb file is present in the good folder.
    And when I look with phpMyadmin, the table “geot_countries” is there and is full with country codes and country names.
    I’ve disabled all my other plugins and change my theme for Twenty fifteen.

    Still, I have empty dropdown list for countries…

    Any other idea ?

    Just a clue: my website is hosted on a nginx server (not an apache) could it interfer with your plugin?

    By the way, I checked the “Delete all data on Uninstall” check box in The Popup plugin settings page. But when I deleted the plugin and install it again, I found again all my popins and parameters…

    Thanks.

    Thread Starter lyonbeton

    (@lyonbeton)

    Hello there,

    I made a new test to continue my investigations.
    I setup up Geotargetin Lite plugin + Popus plugin in an another site with a similar configuration.
    It’s also hosted in a nginx server.
    I create 2 popups : one for country = USA and one for country = France.
    I’m browsing my site from France and I’ve the USA popup!
    If I switch the country from USA to Canada for instance, I’ve no pop-up at all.
    It’s like I’m browsing from the USA and it’s not only me, it’s all my visitors.
    Could it come from my hosting provider?
    Any ideas on how to solve this mystery?
    thanks.

    Plugin Author Damian

    (@timersys)

    Hi I found some bugs on the geotargeting plugin. Check in some minutes and update to version 1.2.1 and let me know when it’s done to see if it’s working.

    Regards

    Thread Starter lyonbeton

    (@lyonbeton)

    Hi Damian,
    Thank you for keeping me updated.
    I’ve installed the new version as soon as I saw the notification in my admin panel ??

    But sad news: I still have my “USA only” popup displaying for any visit even with a french located IP address. I’m still considered as browsing from the USA…

    Good news for you:
    – the list of countries are no more blank after deactivating and reactivating the plugin!

    (Other feedback not very important – to me at least)
    I’ve also tested to uninstall the popups plugin with the option “Delete all data on Uninstall” checked. When I install the plugin again, I found again all my popups with all the parameters.

    Thread Starter lyonbeton

    (@lyonbeton)

    Hi again,
    I’ve contacted my hosting support to see if the problem may come from us.
    I have got something that looks like a clue.

    My site is hosted in a nginx server with a varnish cache system.
    We’ve done the following test : load the website with httpS instead of http.
    https://www.lyon-beton.com

    I don’t have a SSL certificate for my site, but using httpS skip the varnish cache engine and the popup doesn’t not display.
    It solved my problem !
    It’s not a solution for me because I’m not sure to get this ssl certificate now, but it may be a clue for you to fix the issue.
    Is it?

    thanks

    Plugin Author Damian

    (@timersys)

    Hi
    the popup uninstall data it’s a bug on the popups plugin that will be solved on next release.
    The problem with the detection it’s due to your varnish not properly configured to return the real user IP.
    Ask your hosting to create a php file with
    <?php echo $_SERVER['REMOTE_ADDR'];?>

    If that is showing the real user IP you could try the following:

    add_filter( 'geot/user_ip' , 'set_geot_ip' );
    function set_geot_ip( $ip ) {
        return isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : $ip;
    }

    Regards

    Thread Starter lyonbeton

    (@lyonbeton)

    Hi Damian,

    I’ve been to impatient to contact my hosting.
    I copied your code in my functions file and it looks like to work smoothly if I believe my first tests!
    Thanks a lot Damian.
    Awesome support!

    Thread Starter lyonbeton

    (@lyonbeton)

    Hi Damian,

    it does worked fine during a couple of weeks.
    But it doesn’t work anymore.
    Did you udpate your plugin during the last days ?
    I’ve contact my hosting provider: they didn’t change anythin on their varnish configuration.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Geotargeting problem’ is closed to new replies.