ANywhere in series, if none is included. Depending on opto CTR to bias 1V input IR diode with series R to meet product spec , use Ohm's Law to choose R with drive voltage minus 1V for IR LED and draw required current.
E.g. 8.5mA from 5V to Opto +
5-1= 4V 4V/8.5mA = 470 Ω R in series. for low level drive.
Or... 0V to Opto - input and high level drive ( inverted to above) with 5V logic and 470R in series.
Logic often has 50R internal series R so 420Ω external R will result in desired input current to achieve maximum out rated current ( e.g. 100mA) of DIN device.