• Uncaught SyntaxError: Unexpected token ‘<‘, “<!DOCTYPE “… is not valid JSON at JSON.parse (<anonymous>) at Object.<anonymous>
    (tracker.js?ver=14.10.2:1:1690)
    (匿名)@tracker.js?ver=14.10.2:1
    XMLHttpRequest.send
    [email protected]?ver=14.10.2:1
    [email protected]?ver=14.10.2:1
    [email protected]?ver=14.10.2:1
    (匿名)@tracker.js?ver=14.10.2:1


    in /wp-content/plugins/wp-statistics/assets/js/tracker.js?ver=14.10.2

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter krjojo

    (@krjojo)

     sendHitRequest: async function() {
    try {
    var t = this.getRequestUrl("hit")
    , i = new URLSearchParams({
    ...WP_Statistics_Tracker_Object.hitParams,
    referred: this.getReferred(),
    page_uri: this.getPathAndQueryString()
    }).toString();
    let e = new XMLHttpRequest;
    e.open("POST", t, !0),
    e.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),
    e.send(i),
    e.onreadystatechange = function() {
    var t;
    4 === e.readyState && (200 === e.status ? (t = JSON.parse(e.responseText),
    this.hitRequestSuccessful = !1 !== t.status) : (this.hitRequestSuccessful = !1,
    console.warn("WP Statistics: Hit request failed with status " + e.status)))
    }
    .bind(this)
    } catch (t) {
    this.hitRequestSuccessful = !1,
    console.error("WP Statistics: Error sending hit request:", t)
    }
    },

    in

     4 === e.readyState && (200 === e.status ? (t = JSON.parse(e.responseText),
    Plugin Support Matthew

    (@mhdizmni)

    Hi @krjojo,

    Could you please share your site information with us? You can find it by navigating to Tools > Site Health > Info in your WordPress admin area.

    This type of issue typically occurs when your site is set to display errors, and an error is being thrown at the request endpoint.

    Additionally, please share the URL of the page where you are encountering the issue so we can check the error directly.

    Thank you for your cooperation!

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.