WordPress Heartbeat API cannot parse data

Not 100% sure if that’s the cause but can you try replacing $ with jQuery?

I remember seeing something like this in the past in a similar case.