It is effective for some dogs, you just have to be careful not to spray it into the dog's eyes. It's the same concept as the citronella-spraying bark collars, which do seem to work for some dogs.
There's also a tool called the "barker breaker" that emits a high-frequency tone inaudible to humans, but annoying to dogs. It works for some dogs. There are also collars that use this technology.
There's another product called "Stop That!" which is a little bottle of compressed air with the addition of doggie pheromones. When the dog barks, you spray a burst at him. The blast of compressed air works to startle him out of bark mode, and then the pheromones work to calm him down. I tried it in my grooming shop, it did seem to work, but the bottle didn't last very long. I got maybe a couple dozen blasts out of it before it died. Now I just use the regular pheromone spray when I have a chronic barker. It's not an instant fix, but it does seem to calm down most dogs eventually.