M.W.
She's testing your boundaries. What am i allowed to do? So far you've responded with a mixed bag. So she's going to wonder if the next time she hits you you'll ignore it, or what will happen. That uncertainty is tough on a child, and causes even more issues.
Think of discipline like this. A child is walking down a hallway full of doors. You tell the child that they are ALL locked, BUT the child will test EVERY door just to be sure you told the truth. And even though they would not admit it, they WANT all the doors to be locked. She is old enough to understand rules and boundaries. And she wants you to set the limits, and follow through with discipline. She will be happier.
My suggestion is to write up family rules and post where she can see them. If she doesn't read, print a picture of the negative behavior so she remembers (I did this when my daughter just turned 4 and it has been amazing, I should've done it sooner). When she starts to do a bad behavior, you take her firmly/nicely by the hand and lead her to the rules. Ask her what was it she did wrong, and point to the picture. Tell her that this is wrong behavior (firmly) and tell her what the punishment is (time out is a classic, 1 min/age or like we do it, until they nicely tell us they're ready to apologize, and then they do a specific apology, hugs and kisses). If she does it again, bring her back to the rules and tell her, you broke the rule, show me what it is, and then tell her, because you broke the rule, you will have this punishment ____________. And immediately enforce it.
Ignoring sends the wrong message, as does yelling. This is a way to firmly ingrain in your child what happens when you do wrong behavior, and also helps you keep your cool. That walk to the rules with your child is a great way to refocus yourself and not over/under react. Kids need to learn that there are consequences to their actions, or they will not survive in society, nor will they be happy.
Nip this in the bud, it won't just go away as she gets older, it will just change into a different bad behavior. Best wishes.