• Resolved aelthen

    (@aelthen)


    Hi,

    The geotargeting function of the plugin doesn’t work with a cache plugin…

    It took me some time to see the bug, identify the problem and be able to reproduce it almost 100% of the time, but here it is:

    1) Clear the cache
    2) test the page with gtmetrix –> since the test server is in Canada, it will simulate a visiteur from canada
    3) access the page in private navigation (not logged as admin, since cache is often disabled for admins)
    –> the price will be in CDN, the link will be amazon.ca EVEN if you’re not in Canada.
    I live in France, and I see the canadian version of the links…

    If I disable the cache –> I see the french version of the links.

    So it means that if someone from Canada visit my page first, everyone who will visit the page after that will see the canadian links. That is obviously a big problem.

    I tested with WPFC (wordpress fastest cache) and wprockets, and I have the same problem with both plugins.

    Can I exclude something from the cache to avoid this problem ? A specific javascript or something ?

    • This topic was modified 6 years, 9 months ago by aelthen.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Amazon Associates Link Builder

    (@amazonlinkbuilder)

    Dear @aelthen,

    We don’t use javascript for this country decision for showing ads so whitelisting that won’t help.
    Just see if in your cache-plugin:

    • You can whitelist the shortcode
    • Enable something like country-specific cache

    Please let us know if any of above is possible.

    But, if any of above doesn’t work you will have to disable cache for posts using the AmazonAssociatesLinkBuilder plugin.

    Thread Starter aelthen

    (@aelthen)

    I use WP fastest cache and I can only excluse pages, user-agents, cookies, JS or CSS.

    Plugin Author Amazon Associates Link Builder

    (@amazonlinkbuilder)

    Dear @aelthen,

    In that case, you have to do any one of following:

    • Exclude all posts/pages using geo-
      targeted links from caching.
    • Switch to another caching plugin which supports shortcode-exclusion from caching or prvides a country-specific caching feature.

    Nuts. This means we can’t combine this plugin with any easy-to-use, efficient, whole-page caching plugins like WP Rocket or WP Super Cache.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Geotargeting + cache = bug’ is closed to new replies.