The heating mat/pad should stick to the outside of the tank; the heat will travel through the glass. It is always preferable to place the mat on the side of the tank. This is the case with any burrowing animal, including pacman frogs. The frog will dig deeper into the substrate when it wants to cool off, so therefore the substrate MUST be cooler as it goes deeper or else it will become confused and stressed. The way i recommend is to place the heat mat on the side of the back wall of the tank