If a shot is on target but gets deflected in it will more than likely go to the the player takin the shot. If the ball isn't on target it's an out and out OG. The premiership have/used to have a dubious goals panel where a few ex pros would decide who should get the credit for goals once the games are over.
Years ago you would have seen more OGs as they do tend to give the attacking player the benefit of the doubt these days. And rightly so.