Robbed off the net: "To work properly, wideband and A/F sensors require a higher operating temperature: 1292 to 1472 degrees F ...
So perhaps less than 18" is better.
The output voltage of a wideband sensor varies significantly with temperature so all of them use a feedback current to keep them a constant temperature. As long as you don't get it too close to the exhaust port (i.e. too hot) the only thing the extra heating of the hotter exhaust buys you is requiring less feedback current. In other words, if you place it closer to the head your alternator would benefit by needing to supply a somewhat lower current, but at the possible risk of getting an incorrect reading if the sensor is a little too hot (since the feedback circuit can't supply cooling), and damaging the sensor if it is more than a little too hot.
Everyone seems to use the same Bosch sensor so all instructions "should" be the same (although they're not). For what it's worth, the instructions for mine are to locate the sensor at least 24" from the exhaust port to be sure it does not exceed 900 °F/ 500 °C. At that temperature steel is just starting to have a faint glow, which I've never seen even near the head since the Gold Star's pipe hangs in the breeze instead of being insulated under the hood of a car at the end of a header fed by four cylinders. The (heated) sensor also should be as near as possible to the top of the pipe so water condensation doesn't hit it when the engine starts up and kill the sensor due to thermal shock.
A sensor doesn't like to breathe exhaust when it isn't hot, but neither does it like a blast of cool air filled with H20 vapor on initial startup. So, instructions for mine say to start the vehicle and then immediately fire up the sensor (which takes ~30 sec. to reach operating temperature). Cautions I've read are that the lifetime of these wide-band O2 sensors is degraded by the use of leaded fuel, gasoline additives, excess oil in the exhaust, and oil with high Zn content.
One other note is at some point Innovate started supplying longer bungs to keep the sensor from protruding into the pipe and possibly disrupting flow. I suspect this was just to keep some customers happy who were afraid their cars might suffer a loss of h.p. Anyway, Innovate claimed having the sensor in line with the edge of the pipe rather than protruding into it doesn't affect the reading.
For what it's worth, the sensor in my Gold Star pipe is ~21" from the exhaust port, on the top of the pipe, and on a bung that has the tip barely sticking into the exhaust stream.