From the NGK AFX manual

AFX Installation
Below are recommended guidelines for installing the AFR sensor. Some exhaust configurations may make it difficult to meet each of the recommendations exactly, and some compromise in mounting may be required. The sensor does not necessarily have to precisely meet every mounting guideline below to operate, but please understand that the better you conform to these rules, the longer the sensor will last and the more accurate the results will be.
The AFR sensor should be located between 12” and 48” from the engine, upstream of any catalyst device if so equipped. The closer the sensor is to the engine, the more likely it will be overheated, possibly shortening its life. The further it is from the engine, the more likely condensed water will get into the sensor and thermally shock it, again possibly shortening its life. The sensor should be mounted at least ten exhaust diameters upstream of the exhaust exit (ex. for a 3” exhaust pipe, that is 30”). If the sensor is mounted between one and ten exhaust diameters from the exhaust exit, the AFR measured will be leaner than the actual AFR by as much as 2 AFR at low engine speeds (i.e. less than 3000 rpm).
Make sure there are no leaks in the exhaust system, as this will create an artificially lean (higher) AFR reading. Also, install the sensor upstream of any factory air-injection if so equipped, as this too will cause a false lean reading.