Not really sure about glue, but you could also try magnets. One on each side of the tank. Then glue something to the outside magnet. Easier to remove during cleaning.
Mind you, I'm assuming magnets are safe for a tank because I've seen magnetic algae scrapers.