Princess was spayed a while back & she was having accidents. Both potty training mistakes (a total relapse, actually) & accidental urination. We noticed it especially when we'd arrive at my parents, they have dogs & she gets so excited. For a while now she's been 100%.
If it's nothing medical, maybe it could be from a lot of excitement or she just needs a little more time to get things back in order after her spay.
No vet exp. just my two cents, hope your baby's better soon.