I am tracking my productivity day-by-day. It's generally sloppy, but there were a few outliers where I got done a lot. All these days had one thing in common: I forgot my smartphone at home.
I usually just edit my hosts file now, because it prevents the 2-second "ctrl+t, n, enter" combo and makes me think about what I'm doing.
I don't restrict myself outside of working hours.