<human>: Condense the text into a few key points

My 8 month old Aussie mix (atleast that's what we believe he is) does something very random and I have no idea how to fix it. He LOVES people and is extremely friendly, has never shown any aggression to a single person but sometimes he will bark at people outside and it comes off as very aggressive and it's pretty embarrassing for me. There doesn't seem to be a correlation, sometimes it's on leash, sometimes it's off leash, sometimes it's a guy, sometimes a girl. I know a lot of people recommend treating high value treats BEFORE they bark and see a person but I can never know if he's gonna bark at someone or not... Should I just do it with every single person? I have socialized him pretty well, but do I need to socialize him more or are we past that?

For example, with PokemonGO I took him to my campus and he didn't bark at a single soul and was just the happiest little pup (he is a little sketchy when people try to pet him but once they get that first pet in he is their best friend) but sometimes if I take him for a walk he'll just bark bark bark... I am out of ideas, any suggestions?
<bot>: Dog barks at people (presumably to play with them) but it is an aggresive bark but it is random and he is not an aggressive dog in the slightest.