Data Migration from to

A few years ago, I used the app for activity logging. After switching to Strava, I wanted to move my activity data to the new platform. Sports-Tracker allows exporting of activities, but only one-by-one. This is rather tedious with a few hundred activities.

Then I came across a small script that will create batch download commands for each activity when run in Chrome. The original script can be found here, but I had to do a few slight modifications to make it work again.

// based entirely on this blog post:
// unfortunately the original script no longer works, moslty because jQuery is 
// no longer available on sports-tracker pages.

var key = "sessionkey=";
var valueStartIndex = document.cookie.indexOf(key) + key.length;
var token = document.cookie.substring(valueStartIndex, document.cookie.indexOf(';', valueStartIndex));
function downloadOne(item) {
    var href = item.href;
    var id = href.substr(href.lastIndexOf('/') + 1, 24);
    var url = '' + id + '?token=' + token;
    var filename = 'SportsTracker-' + id + '.fit';
    console.log('curl -o ' + filename + ' "' + url + '";sleep 2');
function loopThroughItems(items)
    var i = 0;
    for (i = 0; i < items.length; i++) {
var items = document.querySelectorAll("ul.diary-list__workouts li a");
document.body.innerHtml = '';

To run the script, you have to do the following:
1) Login to your sports-tracker account using Google Chrome
2) Change URL to
3) Open browser console (Ctrl-Shift-I)
4) Paste the script, hit enter – it’ll run and print something like this to the cosole:
curl -o SportsTracker-<>.fit „…..“
5) Right-click on the colsole and save the contents to a file – call it something like „“
6) Edit the file: remove the javascript at the beginning of the file leaving only curl commands
6) Open (Linux bash) terminal (MinGW would be an option if you are using Windows)
7) Change to the directory where you saved the contents of the console
8) Fix permissions using chmod +x
9) Run the script: ./

Alternatively, you could download GPX files instead of FIT files. Just replace all occurences of fit with gpx in the JavaScript.

Some files will be downloaded with zero length. Just put the corresponding curl statements in another script and run it again until all files have been downloaded correctly.