One way of checking this it is to install an internet nanny. I have found Nanny for Google Chrome to be particularly effective. It is an extension that you can customize to lock down your browser in a number of ways.
As an example, I have a configuration that blocks the news websites I like to visit during the work day except during the time I normally take lunch. If I try to visit one of those sites, I am taken to a screen that reminds me that I am supposed to be working.
I have also set it up to allow me to bypass this block if I wish. You can make the process for doing so as complicated or easy as you like. Once locked down, you can set how hard it is to change the blocking. I've chosen the 32 character option, in which I have to put in 32 characters exactly as shown before I can unblock the site.
For me, this is annoying enough to make me ask, "Do I really have to visit this site, now?" If you find that is too easy, you could always make it 128 characters long.
Would I be frustrated - read really, really, really mad - if my employer even thought about trying to force this on me? You bet. I'd probably fight it tooth and nail.
However, I find that I am actually much more productive when I foist it upon myself. I find that I only have to have it on a while before I get trained not to wander. Over time, I know I back slide, and so, turning it on again is helpful to get back in the habit. What can I say, I'm one of those millenials that can't stay on task sometimes.
This isn't something for everyone, but if you find yourself wandering too much while working (or trying to work), it might be worth giving this a try.