Having dogs sticking their heads out of the window can be risky business. Dogs can get injured by flying debris and this can lead to eye injuries. On top of that, they may fall out or they may accidentally get their necks stuck if they accidentally place their paws on the car window buttons.
However, this doesn't mean your dog has to give up enjoying the fresh air and all the potpourri of scents associated with the breeze flowing through the open windows.
Nowadays, there are special car window gates for dogs meant to prevent dogs from sticking their head out, while still allowing the air to seep through for your dog's olfactory enjoyment.