It's easy for you to sneak in at home compared to the office. There's no universal cure, but there's an obvious lifehack to " remove anything that may distract you." Disable WhatsApp notifications, set "busy" status on Skype, log out of Facebook and so on.
You can install a browser add-on like StayFocusd: it will block individual sites on a schedule or when the time limit you specify runs out. You can also use such things as pomodoro technique, Getting Things Done and other time management tools.
There are also unusual but interesting tools such as Focusmate: here you can spend a work session with an unknown user via video, but without saying a word. The idea is that a work-focused person has a psychological effect on you, and you can't just relax and mess around.