Dice the onions and sauté them in vegetable oil in a larger pan. Also dice the garlic and add to the onions as soon as they start to turn translucent. Also sweat briefly. Stir in a pinch of sugar, caramelize briefly and then add the tomato paste. Fry the tomato paste for 1 minute, it will lose its acidity and develop roasted aromas.
Stir in the salt, nutmeg and allspice. Add the maple syrup, vinegar and mustard and let the liquid simmer slightly. Finally stir in the tomatoes, bring everything to the boil and then boil down over low heat for about 50 minutes until the ketchup has the desired consistency. Finally puree and pour into glasses or a bottle.