My Westie Has Lived With Us For 5 Months And Is Still Not Potty Trained. Help Please!!!!?

We have a West Highland White Terrier. She is the cutest dog we’ve ever had and one of the best. She behaves well around strangers and likes children (too hyper for babies though). She gets plenty of attention and someone is home all day everyday with her. Yet she still goes to the bathroom in the house. She may do good for about 3 or 4 days but then she has an accident again. It’s horrible. I mean we shampoo our carpets all the time because we try to get the smell out so she knows that this is where you don’t go to the bathroom. What can I do to potty train my dog. She has accidents also when people come over. That is so embarrassing. We think that may be from overstimulation, because she is so little and people all love her and want to go to her at one time. Anyways. I desperately need your help to fix this problem with my dog. The rest of my family has just about given up.