Cook bacon in pan over medium heat until crispy. Set aside bacon but leave drippings in pan.
Add butter to pan to melt, then add onions and cook for10-12 minutes until soft. Do not stir too much as you want them to start to caramelize. (If you are using premade caramelized onions, just add to pan without butter)
Add shallots, vinegar, sugar to pan and stir constantly until sugar is dissolved. About 1-2 minutes.
Reduce heat to low and stir occasionally allowing it to bubble. Cook down for about 20 minutes and it should start getting thick.
As jam is cooking down, chop up bacon and herbs.
Remove from heat and add bacon and herbs. Let cool down a bit before pouring into a container.