Forum Replies Created

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

    (@wrigs1)

    Hi carlosfaria

    Thanks for the praise of this plugin. Sorry for delay in response. Its not something I’d do myself, and I didn’t have a GitHub a/c but I set one up just for you! https://github.com/Andy-Wrigley/cc4wpsc

    Issues:

    1. identifying state. From recollection state is not provided by Maxmind country.mmdb? or Cloudflare. If user opts for state level caching then separate lookup will have to be done using Maxminds city(?) database.

    2. performance: Many more “pages” will need to be separately cached. City database is HUGE and will have some impact on look-up speed.

    3. User settings interface: will need modifying to additionally allow option of additionally caching by state for specified or all countries.

    4. It may have a major impact on caching logic. It might be possible to minimise impact by using a cookie and WPSC hook e.g. do_action( ‘wpsc_add_cookie’, ‘cc4wpsc_state’ ); see https://odd.blog/category/wordpress/

    I’m very busy developing Country Caching for WP Rocket at moment so I can spend little time on this and responses may be slow. N.B. the Rocket version can use Amazon Geoip or HTTP Header/Server Var Geoip and at some point I’ll retrofit this into CC for WPSC.

    best Andy

    Plugin Author wrigs1

    (@wrigs1)

    I’ve now developed a Country Caching extension for WP Rocket. However, the vast combination of plugins and Rocket settings all affect how content is cached and, unlike my other plugins, it is inappropriate to release it until tested by a number of volunteers.

    If anyone would like to test this extension then please contact me.

    I am marking this thread as resolved, as it is not an issue but a question that has been answered (and also already covered in the plugin FAQ).

    Plugin Author wrigs1

    (@wrigs1)

    No – like other server side country geolocation plugins. (Note CCA widget category based ads should work without problem)

    However, earlier this month WP Rocket provided me with their plugin so I could create a “Country Caching Extension” for it (similar to those I have created for WPSC and Comet Cache). Hopefully this will be available mid Sept; and CCA country Ads should then work with WP Rocket.

    Client side (not recommended): the CCA plugin also provides an API for client side country geolocation which should work with Rocket. Client side country GeoIP is slower and clunkier for the visitor. In your case (instead of simply associating Advert with country via a dropdown selector) it would involve using the API and complicated javascript coding to dehobble and execute relevant JS Ad – not recommended unless you are a JS expert.

    • This reply was modified 6 years, 2 months ago by wrigs1.
    Plugin Author wrigs1

    (@wrigs1)

    Update: On contacting msmithers I was able to replicate issue and produced a modified script for his issue. See revised custom script here CCA How To: fixing Cookie Notice’s Google Analytics (and reload) issues.

    Plugin Author wrigs1

    (@wrigs1)

    Hi Michael,

    Sorry; I’ve been tied up today. Thanks for the contact link it’ll simplify diagnostics/testing (e.g. you can temporarily remove my country from lists of EU countries so I can see if I am affected by reload; and what cookies are added to my browser)). But v busy over next few days, so if you don’t hear from me tomorrow you can chase me via this link https://wptest.means.us.com/contact-us/

    I’ve tried various browsers and can’t replicate issue. I’ve not used (paid?) Pingdom tools and don’t know whether you are referring to use as an online proxy (if and how it stores cookies on navigation may impact, as they will no longer be stored by your browser under the relevant domain).

    I assume you are located outside EU and when not using pingdom browsers on your devices still reload?

    If you are based in the EU then you can still test non-EU behaviour locally with a variety of browsers by removing your country code and “EU” from the group/EU country lists in BOTH CCA and Country Caching settings (don’t forget to save settings). As before; once you have made these temporary changes you will need to clear browser cache and cookies for your domain in the browser; and as a minimum delete cache for all pages you intend to use to test landing and subsequent navigation.

    There is possibly an alternative method involving the editing of one line of code in your CCA plugin (which I could add to the next release of CCA) but I would prefer to avoid this and have a working solution without modification.

    Plugin Author wrigs1

    (@wrigs1)

    Hi Michael

    Sorry, I’ve altered the “setcookie” arguments in the example (link above) to expire after 364 days and to have a “path” of “/”. I’ve tested with WPSC Country Caching; and scripts are served without a reload for first and subsequent pages providing the visitor is non-EU.

    If you were experiencing non-EU first page reloads then I don’t know why it didn’t arise when you weren’t using WPSC. To test (probably telling you what you already know):

    1. Clear browser cache for domain.
    2. Clear Cookies for domain.
    3. Go to WP Super Cache Settings -> “Content” (note WPSC may incorrectly report 0 cached pages) click “Delete Cache” or click “List all cached files” and delete individual cache for pages you want to test.
    4. In Cookie Notice “blocked scripts”->Body (presumably now empty) insert <script>alert('FOR NON-EU THIS SHOULD NOT APPEAR ON FIRST VISITED PAGE')</script> and save.

    As the alert says, it should NOT be displayed on first page ever visited for non-EU visitors. It SHOULD appear on subsequent pages (as CN will add it without reload).

    Plugin Author wrigs1

    (@wrigs1)

    Hi Michael

    Yes you are quite right. Because we know whether a visitor is outside the EU before serving the page, we can choose to immediately serve “everything” to non-EU visitors avoiding the need for a reload.

    See this CCA How To: fixing Cookie Notice’s Google Analytics (and reload) issues. Because of CN’s reloading before inclusion of GA, first time visitor organic (referrer) info cannot be collected – but with CCA installed we can include scripts immediately, and fix the issue for non-EU visitors. I’ve extended the “How To” to cover preventing reload for non-EU. (tested and works for me)

    Let me know if this helps.

    Plugin Author wrigs1

    (@wrigs1)

    Hi Alex,

    Chances are your Maxmind data directory contains an old version of “GeoLite2-Country.tar” that for some reason CCA was unable to delete.

    Relevant part of CCA update process:

    1. if “GeoLite2-Country.tar” exists it is “unlinked” i.e. deleted
    2. “GeoLite2-Country.tar” is decompressed (extracted) from “GeoLite2-Country.tar.gz” (n.b. PHP prevents extraction if a file of the same name already exists in the directory)
    3. if the extraction failed an error message is created and emailed to you; otherwise processing continues.

    Possible reasons CCA was unable to delete the “old” file:

    1. Owner & file permissions: Under Linux etc files and processes have owners. A file created by CPanel, FTP etc may have a different owner than one created via WordPress. If, say, you manually extracted a Maxmind Tar in this directory then the CCA script may not have sufficient privileges to delete the file.

    2. Your server may have cached the file’s status before deletion and PHPs Phar decompress thinks the file already exists and halts extract.

    3. File locked and in use by another process (unlikely).

    I already have your email from a query on another subject so I’ll contact you direct to avoid open discussion of your file security settings; and later you and I can update this thread with cause and hopefully solution.

    • This reply was modified 6 years, 4 months ago by wrigs1.

    The Category Country Aware plugin has a check box setting that will restrict Cookie Notice to EU/EEA countries only. If your country requirements differ from this; you can also edit the list of “EU” countries via CCA settings.

    See documentation on setting up CCA for use with Cookie Notice including info on compatibility with various caching plugins.

    If you install this country caching extension plugin (even if you are not using geolocation) it should fix the issue with Cookie Notice. You may need to clear cache after installing for it to take effect.

    Plugin Author wrigs1

    (@wrigs1)

    Update on issue and “fix”.

    I mentioned I suspected CN may not allways work correctly with caching (whether using CCA or not) this has been confirmed. This issue can be fixed using the Country Caching Extensions (even for those not using CCA and geolocation) – as a byproduct there is no need for CCA to add the cnreloaded query string for reloads (next release of CCA) your original issue.

    Had some thoughts; and it is also possible for CCA to serve Analytics without the need for any reload and provide correct data for your non-Eu visitors. See new documentation. Currently CCA will still reload on first visit but in the next release it will only reload if you have opted to reload in CN settings.

    Hope helps.

    Plugin Author wrigs1

    (@wrigs1)

    This is a Cookie Notice issue – however CCA provides a fix for your non EU visitors. See new documentation for CCA when used with Cookie Notice and Google Analytics Any queries relating to CCA/CN & Analytics are best posted on that page.

    Hope this helps.

    I was looking at adding a client side option to a (GDPR compliant) server side geolocation plugin; but did not follow up with the 2 you mentioned because I would have had to register to use/test the API; and their privacy policies gave me the impression data that might be considered PII was gathered.

    Note: on my visit neither site (despite identifying my EU location) displayed a cookie bar of any kind; let alone asked me to accept cookies.

    Ipstack (freegeoip): “Data processed when using the Services is processed by us only as a processor, not as a controller.” I assume this means your site is responsible for obtaining consent if required – which makes sense as the user is unaware they are being connected to the API site.

    Under terms for API it says it “collects information, including standard information of the type normally exchanged when accessing any web site or web service” and refers back to Privacy Policy (presumably para 2.1, which includes IP, date time, site from, browser + version, operating system, and language).

    To me the information collected is similar to Google Analytics (and the majority view appears to be that GA requires consent).

    IPInfoDB privacy policy is even more opaque: “information may be kept in its identifiable form, or in an aggregated form (so that individuals cannot be identified)“; and a right to pass aggregated data to 3rd parties for business purposes.

    Under “cookies” the policy mentions “user ID” and “tracking”. I assume this refers to the API service as well as website, as later it refers to turning off cookies in your browser and “you may not be able to take full advantage of IPInfoDB Website & Web Service“.

    Based on these policies I decided to assume consent would be required and not to spend more time checking.

    My impression may be wrong, a plugin developer considering these APIs should contact the API provider for a definitive answer. Apologies for my original comment which was too categorical, and its mention of CF cookie a red herring (more important is what information the 3rd Party is gathering on its own servers (GDPR relates to collection of PII data on other media, not just cookies).

    • This reply was modified 6 years, 5 months ago by wrigs1.

    This is something I’ve been considered. Unfortunately use of a 3rd Party API (e.g. Maxmind – I assume others are the same) as in the (pre GDPR) example link would make GDPR Cookie Compliance er NON COMPLIANT!

    Maxmind sets a uniquely identifying cookie (__cfduid) for the individual/device that makes the request. Maxmind’s privacy policy is vague; but it might also be recording data from such requests in its own database (requiring consent under GDPR). Elsewhere on its site Maxmind points out it is up to a site to obtain consent when providing Maxmind API services.

    i.e. to comply with GDPR you could only check the visitor’s location via a 3rd party API AFTER they accept cookies (when it is pointless).

    • This reply was modified 6 years, 5 months ago by wrigs1.

    You can limit Cookie Notice “pop-up” (and blocking of scripts/cookies) to EU/EEA countries only, by installing the Category Country Aware (CCA) plugin.

    Once installed go to its settings (Dashboard->Settings->Category Country Aware) and under the “Countries” tab enable the option to limit Cookie Notice to “EU” countries, then save settings.

    If you are using a caching plugin then check the CCA plugins “How To” documentation to see whether it is compatible.

Viewing 15 replies - 1 through 15 (of 72 total)