Most magnets can be bonded in place with two-part epoxy adhesives. We recommend Araldite Rapid which sets hard in about 5 minutes. We also recommend Loctite Industrial strength Adhesive which has a similar setting time. Both these have a proven track record of reliably bonding magnets to most surfaces with the exception of certain polythene type plastics.