Support » Plugin: CAOS | Host Google Analytics Locally » Site is https but script is http, causing mixed content warning

  • My site domain is https and always has been, but for some reason the gtag.js script is being loaded over insecure http. This is causing mixed content warnings so the script is being blocked, therefore visits are not being tracked. It looks like it hasn’t been working for about a month now.

    Here’s the output in the console:

    Mixed Content: The page at 'https://example.org.uk/' was loaded over HTTPS, but requested an insecure script 'http://example.org.uk/wp-content/cache/caos-analytics/analytics.js'. This request has been blocked; the content must be served over HTTPS.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    Hi Simon,

    That’s strange. Could you check your URL settings in WordPress Admin > Settings > General? Are WordPress Site URL as well as Home URL both set to https?

    Thread Starter Simon Blackbourn

    (@lumpysimon)

    Yep, that was the first thing I checked 🙂 Everything is set to https.

    I’ve also searched the entire options table in the database for option_value LIKE '%http:%', just to make sure, and there were no matches.

    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    Could you make some screenshots of your settings in CAOS? I’ll have to try and recreate this issue.

    Thanks,

    Daan

    Thread Starter Simon Blackbourn

    (@lumpysimon)

    Hi Daan

    Here are screenshots of the settings tabs: https://imgur.com/a/Mtsczmc

    I found this in gtag.js on line 65: $k=function(a,b,c){var d="http://example.org.uk/wp-content/cache/caos-analytics/analytics.js"

    Thanks for your help looking into this!

    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    Ok, so it might be an issue with my URL rewrite mechanism. Let me see what I can do!

    Thread Starter Simon Blackbourn

    (@lumpysimon)

    Thanks for the update, much appreciated

    Thread Starter Simon Blackbourn

    (@lumpysimon)

    Hi Daan

    Just wondering if there is any update on this issue?

    Many thanks 🙂
    Simon

    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    Sorry for leaving you hanging. I’ve researched the issue, but I haven’t found anything that might cause it.

    When you have time: could you share a list of other plugins you’re using? I suspect another plugin might be doing some tricks with rewriting URLs. Maybe.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Site is https but script is http, causing mixed content warning’ is closed to new replies.