I got a larger Suunto compass and incorporated it into my travel mount system relying on tripod 1/4-20 thread and velcro. The compass is somewhat sensitive to the proximity to the handlebars with infrastructure there and seemingly most importantly to the headset and not so much to the rest of a steel frame. The deflection away from the true magnetic north seems to depend on the bike.
In any case the compass passed the freezer test and I decided to keep it intact, i.e. it taken be taken off and used for hiking. My system benefits from wide availability of various cheap and decent pieces for photo equipment and allows me to move things around between bike, camera, car etc. Whether the compass will work in practice in the handlebar area remains to be seen. Photos below.