WARNING: This page is about a different car, the 2008 Subaru Impreza. However, it is still accessible from the selected car via links, so may be relevant.
Install in the reverse order of removal.
Tightening torque:
T: 6.4 N.m (0.65 kgf-m, 4.7 ft-lb)
Fig 1: Identifying Crankshaft Position Sensor Installation