Brown spotting?

I have researched what did it mean to have brown spotting.. I want to get advice from people who have had it before whether it was before a period or because of pregnancy? I still have yet to receive my period but I'm hoping it comes in a few days! I have experienced cramping as well.