Postive test and spotting

I was due for my period on the 27th. The week I was supposed to have it I only had some spotting. I took a pregnancy test and it came back positive. Since then I've still had spotting. It mostly seems like a brown color but sometimes it's a little more red. I've also had a lot of cramping. I'm wondering if this is normal or if I'm maybe having a miscarriage. Has this happened to anyone before?