I had spotting with my first pregnancy, had a scan at 7 weeks which showed a sac measuring 5 weeks and I miscarried the next day, BUT this time I had more spotting at 5 weeks, had a scan at 6 weeks and saw a nice strong heartbeat, continued to bleed brown for a week or so and they coudlnt tell me why, but now my bubba is due in less than a month, so was alll good. So seeing a heartbeat is a really good sign and sometimes you can get random bleeds during early pregnancy and never know what caused it.
Id try not to worry about it too much, if it carrys on for another few days or so I would check in again with your midwife or doctor just to check everything is ok, they could do hcg tests for you, cos with a healthy pregnancy your hcg should double every two days.
**hugs** I know how horrible it is to worry about this, I was a wreck this time round with the fear we would lose another baby, but was all good in the end