The sensor is supposed to held by the black clip thats towards the left hand side of the pic, Basically on top of the ECU, If you look at the pic, you will see the black clip.
Its like a U -Y Shaped clip, Its mounted on the Bracket that holds the ECU