Yes. There is a better way and it is much nicer, easier, faster and less smelly.
Take your puppy out ALOT. After eating, drinking, before playing, after playing LOL.
Most of potty training is getting the pup to the right place before they HAVE to go.
Always take the pup out on a leash and STAY with the pup while she does her business. Then praise and reward her like crazy. Jackpot her with treat---Give her three or four, one at a time, and then play a bit outside if the weather is nice. Make the treat a good one that she only gets for going potty outside. (Pick one spot in the yard, always go there and she'll prefer it even as an adult when you are not holding her leash.)
Confine her inside in a crate or pen unless you can watch her closely. If she goes inside, scoop her up and take her outside and then when she potties outside, praise like crazy.
Soon the pup will get the idea that going outside is a GREAT thing and means treats and petting and fun. The pup will want to go outside.
Get this book "Before and After Getting Your Puppy" by Dr. Ian Dunbar. He explains this and has a ton of helpful tips.
BTW This method worked for me and I was taking an 8 week old pup out in miserable weather last February. We're talking sleet and snow and freezing rain at times. He didn't want to be out there and neither did I, so he learned to go fast. This is awesome because now I can take him out on a leash and have him potty quickly and on command.
My breeder (who has dogs with titles in everything ) uses the same technique with her dogs.
Oh! I almost forgot. When the pup is older and you're going for walks, potty first in the backyard and THEN go for the walk. Never walk, potty and then inside. The dog will learn that potty signals the end of outside fun time and hold it as long as possible which will be a pain if you ever have to get the dog to go quickly before you leave the house.
Best of luck!
PS Rubbing your pup's nose in it or hitting her may only teach her to potty where you can't see her---which will mean finding "surprises" behind the couch, etc.