Spanky lifted his leg the first couple of days when I brought him home.

I decided to limit his space. I bought a baby gate and left him in the bathroom. I would only let him out when I was able to focus all my attention on him. If I caught him sniffing, he'd be put back into the bathroom. I would reward him when he went on his puppy pads. I think he now understands that marking is not tolerated. He has not lifted his leg since then.