In a saucepan over medium-low heat, melt the butter and then add the diced onion. Cook for 1-2 minutes until onion begins to soften.
Add the diced apple and golden raisins, and cook for another 1-2 minutes. Then add the apple cider vinegar, coconut palm sugar, water, salt, cinnamon, allspice, and cranberries.
Reduce the heat to low, cover, and cook for 10 minutes. The cranberries will burst, and the mixture with be thick.
Stir the mixture and transfer it to a mason jar or storage container. Cool and refrigerate for up to two weeks.
Bring to room temperature before serving.