• Resolved hayobethlehem

    (@hayobethlehem)


    hi there. I’m getting no visits record. the script is excluded from optimization.

    The FAQ on here says “This is usually a file permissions issue. The first thing to check is whether the?/wp-content/uploads/pageviews.php?file exists and is writable by your web server”

    Well, that file isn’t there. Even though full read and write access is there. How can I add this file? is that still a thing? i cannot find it in the plugin package. koko-analytics-collect.php dit get written to the root.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Lap

    (@lapzor)

    Hi,

    I just checked the link you shared and it looks as if the Koko plugin isn’t loading at all.

    But when I go to https://hayobethlehem.nl/photography/switzerland-2018?ao_noptimize=1 it is but still not fireing properly.

    Could you deactivate Autoptimize and then test in a private browsing window is that triggers a visit?

    Thread Starter hayobethlehem

    (@hayobethlehem)

    thanks. I disabled autoptimize. Also tried just putting the js code in analytics.js and made an empty pageviews.php but neither of that had any effect.

    Plugin Support Lap

    (@lapzor)

    I found the error

    Refused to execute inline script because it violates the following Content Security Policy directive: “script-src-elem ‘self'”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-1zKaGOBF2gidTYncb2J331dX9HCjI/T/ytligumLNgI=’), or a nonce (‘nonce-…’) is required to enable inline execution.

    Your site / server has a pretty strict content security policy:

    base-uri ‘self’; connect-src ‘self’; default-src ‘self’; frame-ancestors ‘self’;style-src ‘self’; media-src ‘self’; object-src ‘none’; form-action ‘self’; font-src ‘self’;frame-src ‘self’ https://www.youtube.com https://player.vimeo.com https://vimeo.com https://www.youtube-nocookie.com;img-src ‘self’ data: https://ps.w.org https://i.gr-assets.com https://hayobethlehem.nl https://i.ytimg.com/;script-src-elem ‘self’;script-src ‘unsafe-eval’ ‘self’;

    I will ask Danny if we can ass the hash to the script or else add unsafe-inline as a workaround. In the meantime you could see if you can change your content security policy to allow the script.

    Now I just need to figure out why this error occurs on your site, and not on others …

    because CSP is only very rarely used because it can easily break things? ??

    Plugin Support Lap

    (@lapzor)

    Yes I can see that ??

    I will ask Danny if we can work around this, but it would be awhile before he could push out an update.

    Thread Starter hayobethlehem

    (@hayobethlehem)

    i actually don’t get that script src element warning in dev tools. that’s odd. how did you get to see it?

    as long as the js file comes from the same domain there shouldn’t be an issue.

    regardless, the scripts.js the plugin is supposed to put in the footer never shows up.

    • This reply was modified 1 year, 10 months ago by hayobethlehem. Reason: misread something
    • This reply was modified 1 year, 10 months ago by hayobethlehem.
    Plugin Support Lap

    (@lapzor)

    I see two warnings, 1 for CSS and another for inline script referring to the Koko inline script code (not an external file).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘no recording of the visits’ is closed to new replies.