Tracking my period

So my period is very irregular and I want to try and figure out how is the best way to get down to knowing around the time I need to start watching out for it because I don't want to slip up one day and have an accident and then be embarrassed