So gluing it or not doesn't affect how quiet/cool the cabin is?
I don't claim to be an expert but I don't see how.
Foil isn't a good insulator, it reflects OK though. The mat type stuff is a compromise. The black stuff is sound absorber. Like how you can damp a ringing bell by laying your hand on it. Thus the people who make and sell it often say you only need to stick pieces of it here and there for it to have good effect. If you pull out the interior of a later model luxury car you'll see similar stuff used exactly that way. But since we are hot rodders and don't have sound labs to test where we actually need it we just paste it all over. The foil back is just a bonus, I doubt it helps with insulation. But it looks nicer, is easier to apply, and keeps your other stuff from sticking to the mat.
I like that mat. Stick some inside your doors and it gives them a nice thump when you close them versus a clang. Lots of folks have found it to quiet a car down nicely. For actual heat insulation you need some underlayment though. Lots of places sell some stuff that looks like bubble wrap with mylar on each side. You'd think it would help but somebody finally tested some out there on the net and found it actually had an insulative R value like a few sheets of paper or something. Meaning a whole lot of us wasted money on that stuff. It kind of makes crinkly noises under carpet anyway.
Mat (or some variation of it), heavy underlayment, carpet. Nothing you wouldn't find on a nice new car. It works.
I have noticed newer cars often have the underlayment glued to the back of the carpet. They call this "mass-backed" carpet. I suspect it's done only to make it quicker and easier to assemble the car when new. I know for sure it makes it a LOT easier to install new carpet of that style in my driveway. (IF the company didn't trim it too short on the passenger's right front footwell. Hear that ACC?)