How to use an Analytics in workers or get the users IP

Someone visits my workers without reason , it waste a lot of sources ,so I wonder who he is.However when i used the Baidu analytics it is can’t be deployed. And plz tell me whether you have another wat to get IP and the refer?

You can use this information: