Several things can sabotage your concentration. If you want to change this, the first step is to figure what really steals your attention.
If you are not sure, try a time tracker like RescueTime: it tells you how much time you spend in a given app or on each website you visit. You’ll be surprised to discover how your day goes by.