If you only need an on/off sense, or a few levels (nominal, over, brownout, 120/240...), a comparator (or similar effect by way of biasing the LED, or a few transistors, or an IC proper) can be wired on the mains side.
Optos are useless even for gross accuracy signal coupling (>50% error) because the gain is so unreliable. Unless you use a linearized one like IL300, indeed (and even then, it's only within about 20% untrimmed).
The preferred solution is a sigma-delta modulator on one side, logic isolator (can be opto, or inductive and capacitive monolithic solutions are common these days), filter (or other demodulator basically). Bandwidth is limited (it's basically a 1-bit ADC/DAC), though solutions up to a few 100 kHz are available. More, you might want a proper RF system instead, whether that's direct coupling via transformer (perhaps diplexing bands between a LF opto channel if needed) or modulated on a higher carrier (or lower for that matter; you can make an isolated chop amp, with some cleanup needed around Fsw of course).
There's also the possibility of resistors, which, I forget what the actual rules are, if isolation only needs to be some resistance (megs --> ~uA maximum leakage), or there are additional requirements (galvanic path something or other?). They need to be rated for transient voltage at the very least (hi-pot and surge).
Tim