I use imapmyride on my iphone. It's not perfect, but it is free and fine for basic tracking. Sometimes it'll stop during my ride but I can go in through the website and edit the route to add anything it missed. If you're taking really long rides it'll probably burn up your battery though.