Personally I've really become fond of Gorilla superglue. It seems a little more shock resistant than other superglues I've used.
I have found that while superglues will hold magnets they lose their grip after a couple of years and have to be redone.
For a really good stick I'll use JB weld epoxy (which is really fun to watch near a magnet while it's still soft) https://www.amazon.com/J-B-Weld-50112-C ... weld+epoxy
The choice of glue will obviously be affected by how/where the magnet is mounted; a very tight fitting hole might get away without glue at all, exposed or tight fitting magnets should probably use superglue, while hidden or lose fitting magnets can be epoxied into place.