• Resolved Nate

    (@goseongguy)


    Hi,

    For the last several weeks, I have been battling a 406 error from the analytics.js request with CAOS. No analytics have been tracked since having this error.

    I searched the forum and found your suggestions to contact the hosting company regarding a size limit for requests. I also found one user reported having a mod_security issue. My hosting company keeps saying it’s not something on their end and are appealing to the developer to address. Their explanations are a bit over my head but here is what they are saying:

    Hosting: “As checked, the scripting needs to be updated, Since it is scripting related we do not have much access from our end. Please check with any developer regarding the issue and they will resolve it for you.”

    Me: “This script should be updated every 24 hours automatically from the Google source. I have also been updating it. May I ask what makes you think something is not updated?”

    Hosting: “When a 406 Error occurs, the first sources to investigate are the Accept-Headers by either accessing the source code or you can request any the developer to check error code.”

    Me: “So you don’t think it’s a mod_security issue? And there is no size limit for requests configured on the server?”

    Hosting: “The response “ 406 Error – Not acceptable ” is not as common as a “404-Page not found” .The error is received if the browser does not support a format sent by the site or the request is in violation of some settings. Yes, There is no setting needs to be updated from the server end, everything is updated by default from the server end”

    Things I’ve tried include: disabling ad blocker stuff, VPN, disabling Stealth Mode and re-updating and clearing cache, disabling all plugins, removing custom htaccess stuff.

    Can you make any sense of what my hosting company is saying or have any ideas?

    Thanks,
    Nate

    • This topic was modified 4 years ago by Nate.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi Nate,

    The first sources to investigate are the Accept-Headers by either accessing the source code or you can request any the developer to check error code.

    Where are you hosting? Because this is just not true. Accept-Headers are not defined in the code of a plugin (e.g. CAOS) or CMS (e.g. WordPress), so what source code is he talking about?

    Anyway, for testing purposes: what happens when you switch to Minimal Analytics? (Under basic settings > snippet type)

    Thread Starter Nate

    (@goseongguy)

    Hello Daan,
    I have Bluehost. Yes I was not following them well at all.

    I tried minimal analytics. The error is removed, but it adds an interesting “POST collect” item as can be see in a GTMetrix report which takes seconds just for that item: https://gtmetrix.com/reports/goseongguy.com/dExRu4gN/
    However, it does seem to be tracking, as I can detect myself as a realtime user.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ok, so now we’ve excluded CAOS from being the culprit. ?? Cause when we switch from GET-parameters (analytics.js) to POST (Minimal Analytics) suddenly it starts working.

    The POST collect call is Stealth Mode Lite: yes, it’s slower.

    But wait, you say you’re getting a 406 error on the analytics.js file? That’s weird. What happens when you switch back to Analytics.js (set snippet type to asynchronous) and manually Update analytics.js (the button at the bottom)?

    Thread Starter Nate

    (@goseongguy)

    When I switch back to Asynchronous for analytics.js and Update, it goes back to the same situation with 406.

    I suppose I could stick with minimal if I have to.

    I don’t know how or what to tell Bluehost to convince them of what to change. Seems like there’s not much of a definitive statement that can be made for what specifically to solve eh?

    Anyway thanks for the reaching out so quickly.

    Thread Starter Nate

    (@goseongguy)

    And just to be more specific of what the errors look like:

    Failed to load resource: the server responded with a status of 406 ()
    /wp-json/caos/v1/proxy/j/collect?v=1&_v=j88&a=570618262&t=pageview&_s=1&dl=https%3A%2F%2Fgoseongguy.com%2Fko%2Fgoseong-cafes%2F&ul=en-us&de=UTF-8&dt=Goseong%20Caf%C3%A9s%20-%20Goseong%20Guy&sd=24-bit&sr=1366×768&vp=1687×794&je=0&_u=CACAAAABEAAAAC~&jid=&gjid=&cid=1374763589.1613364425&tid=UA-174924011-1&_gid=2070982497.1613659519&_slc=1&z=73999589:1

    And then if I refresh the page:
    f574c46f65175c2a3acac37c5108b12c.js:50 POST https://goseongguy.com/wp-json/caos/v1/proxy/j/collect?v=1&_v=j88&a=320441424&t=pageview&_s=1&dl=https%3A%2F%2Fgoseongguy.com%2Fko%2Fgoseong-cafes%2F&ul=en-us&de=UTF-8&dt=Goseong%20Caf%C3%A9s%20-%20Goseong%20Guy&sd=24-bit&sr=1366×768&vp=231×729&je=0&_u=CACAAAABEAAAAC~&jid=&gjid=&cid=1374763589.1613364425&tid=UA-174924011-1&_gid=2070982497.1613659519&_slc=1&z=1279999312 406

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ah, okay. That’s not the Analytics.js file you’re getting the 406-error on. It’s the collect call.

    The Analytics.js file is making the same collect call, but in GET (instead of POST) format.

    I don’t know how or what to tell Bluehost to convince them of what to change. Seems like there’s not much of a definitive statement that can be made for what specifically to solve eh?

    I’m sure your hosting provider has set a maximum length to their request URLs. And I’m also pretty sure they’re not going to adjust that.

    So, if you can, stick with Minimal Analytics. Just be aware that it doesn’t offer the same support as Analytics.js. It doesn’t support e-commerce features, for example.

    Btw. If you want Stealth Mode to work faster, purchase the Super Stealth Upgrade. There’s more info here and a coupon here.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Btw. If you open the link from your last post in your browser: it literally says it’s generated by Mod_Security ??

    Thread Starter Nate

    (@goseongguy)

    Ah, you’re right. Many thanks for helping me understand this better. I might try once more letting Bluehost see that message themselves to see if they’re sure they won’t adjust the mod_security thing (I assume mod_security and length of URL are two different potential causes).

    Thanks again! ??

    • This reply was modified 4 years ago by Nate.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Sure! No problem!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘406 error; have contacted hosting twice now’ is closed to new replies.