Bots attacking my Google Analytics user id

I looked into my Google Analytics dashboard and found it was still tracking visitors even when my website does not have the JavaScript tracker.

It turned out to be a bot that was attacking my Google Analytics user id and created fake visits to pages that do not exist on my site and get referred from sites that are not related to my site and subject matter I have written about.