HELP!! My dog keeps peeing in the house 😫🤦‍♀️🤬

(This is NOT the first time this has happened)

Me and my husband were coming downstairs this morning and my dog came with us downstairs and I said to him “you wanna go potty” and he starts running towards the door and then just starts peeing while he walks. Then held it for 30 seconds before he went potty outside, so I know it wasn’t because he couldn’t hold it. This sometimes happens when he gets too excited, or just randomly even though I take him out. He doesn’t pee in one spot, he will literally run and pee EVERYWHERE. I’m at my wits end with him.

He will also poop in the house when we leave the gate open upstairs.

No he is not neutered