In a medium saucepan, melt the butter over medium-low heat. Add the onion, beer, and salt, stir, cover, and cook gently for 15 minutes, watching carefully and stirring every few minutes so the onion doesn’t stick to the pan. Add the remaining ingredients, stir, and bring to a simmer. Let the sauce simmer away for 30 minutes, stirring every so often.
Using an immersion blender, puree the sauce directly in the pot until smooth. (Alternatively, carefully transfer the sauce to a regular blender and puree until smooth. Be careful when blending hot liquids!)
Transfer to a jar, let cool completely, and store in the fridge overnight to allow the flavors to develop. The BBQ sauce will keep in an airtight container in the fridge for about two weeks.