a lambda sensor needs to be up to temperature to work. if it's close to the exhaust it may get hot enough anyway, but it may take some time.
some lambda sensors have a built in electrical heater so that they can reach operating temperature quickly and / or can be placed more conveniently in the downpipe, and also after the cat in modern cars.
you can wire the heater up using the fuel pump relay so that it's only on when it needs to be.
hth