Here is a goal: Gluing the magnets for the rack

Which way makes more sense to accomplish this goal?
Place some hot glue into the holes you made the press in the magnets letting sit for a few minutes.