Spotting

I had my period 2 weeks ago and I woke up to a little spotting I had sex yesterday but I never saw spotting when it not time for my period has this happened to anyone before?