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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)