Ideally one should remove all foreign bodies before immersing. Therefore, it would be best to have the piercing done just after using the mikveh, in order to allow about a month for it to heal before you go to mikveh again.
In a case of necessity, there is room to permit items meant to adorn a woman (including earrings) if they are difficult to remove and they are not tight on the body. If it is not possible to push off your piercing until after immersion (for scheduling reasons, etc.), it would be permissible to have your ears pierced this week, and immerse with them next week.
If there is any safe way to loosen the piercing (so that it is not flush against the skin in front of or behind the hole) without removing it, that would be preferred. You should take care to clean well around the piercing site before immersion, and gently rotate the earring while immersing to allow the water to reach all parts of your ear.
Please discuss this ruling with the mikveh attendant in advance, to mitigate any potential discomfort at the mikveh. You can explain that you have permission to immerse in this fashion from Rav Yehuda Henkin, our site's rabbinic supervisor.