heres how i do it, been doing it this way for 20 years now.
take the metal button that the mirror slides onto off the mirror, well before that take a sharp razor, and scrap off any old glue, then scrape the windshield clean, remove the button, lay a nice amount of crazy glue on the whole side that meets the windshield, (make sure you have it right) then hold it where it needs to be for a minute. important part, dont put the mirror back on for 24 hours. and make sure its all clean before gluing it.
any crazy glue works just fine, last one i did i used the bottle with a brush. and my car sits in direct sunlight all day, its still up there a week later now i guess. only reason it was off is because i knocked it of by accident. but it had been there for a year already, i took it off to install a tint brow. and crazy glued it back up.