Don't stick anything to the glass, heat expansion can vary between different materials and the glass cracks. Ask me how I know.
I'm sure there are lots of methods out there that would end in the failure you describe - the identical effect means glueing ceramic veneers to real teeth is a lousy idea that a lot of smart people thought was a good one - until they tried it.
Have you tried using silicone sealant in a 2mm or so layer? It's OK to include something like cocktail- or match-stick spacers in the gap to ensure the layer is thick enough to absorb expansion.
You might prefer to have 'grab', but unfortunately I can't suggest (off-hand) any contact adhesive that would stick a metal surface to a thin foam plastic and from that to glass.
For a quick and dirty fix, brown parcel tape is surprisingly waterproof on a smooth surface and though it only lasts a few months in the sun, it doesn't leave a nasty sticky mess behind like the clear repair tape they sell for greenhouses (which only lasts a year or so anyway).
Cheers.