Here are some pics of custom mounts for a powertap computer. I file the bottom of the powertap plastic mount so it is flat and glue it to the metal band clamp with goop. I’ve made both clamp-on and glue-on band clamps from 3/4" by 1/16” aluminum and .030 inch annealed 304 stainless steel. The SS is much harder to work with. I got the aluminum, already in strip form, from Ace hardware. A 36" length is only about $5. It must be annealed with a propane torch before it can be bent without fatiguing the metal. After annealing, it bends easily and the one sharp bend will not cause the metal to fatigue and break. If a sharp bend is made without annealing, the bend may break while in use (I found out the hard way).
I currently attach the glue-on mounts to my bars with goop. I apply a full wrap of clear vinyl bike-saver tape to the bars, so the band is glued to the tape, not the bars. It’s critical to wrap the tape all the way around the bars, overlapping near the bottom. If you glue a mount directly to the bars, removing the goop at some later time could prove to be very difficult and damage the finish.
I’ve used silicon adhesive/caulk to attach speed sensors to forks, but not yet tried it to attach one of these band clamps. Silicon can be removed more easily without damaging the original finish, but I can’t say that it has enough grip for this application. I found out the hard way that 5-minute epoxy is not a good choice. I nearly lost a $200 computer when it came loose on a fast descent, when glued with epoxy. I did find it, undamaged, among the weeds on the side of a steep mountain road, but I searched for quite awhile to find it.
The clamp-on style is more difficult to bend to the exact size and shape, but it's totally secure. I cut the clamping screw very short and drill a hole in the under side of the powertap mount, so is covers the screw, when viewed from the top.
I use an ordinary 7/8 socket wrench that is a about 1.180 inch in diameter as a form to get an accurate round bend for 31.8mm bars. The form should be a small diameter since the metal always springs back, to a little larger size after bending. One of the tricks to insuring a tight fitting clamp is too keep the upper an lower straight sections separated with a some sort of shim material, at least 1/8 inch thick, while making the bend.