He shouted and swore at his ex, tracked her movements and sent her messages that caused alarm and distress