I'm with Toad, heater next to outlet to the filter.
Not in the flow of the water returning to the tank from the filter as this may have cooled whilst out of the tank and may cause the thermostat in the heater to read a lower reading than that of the tank and raise the tank temp a bit higher. Worse if the filter is in a cold room.
Sent from my iPhone using Aquarium Advice