Techniques and mechanisms for determining a direction of gaze by a user of an ophthalmic device. In an embodiment, at least a portion of a magnetic field is generated by one of the ophthalmic device and an auxiliary reference device while the ophthalmic device is disposed in or on an eye of the user, and while the auxiliary reference device is adhered on the user's skin or under a surface of the skin. The ophthalmic device and the auxiliary reference device interact with each other via a magnetic field, and the interaction is detected with one or more sensors of the ophthalmic device. In another embodiment, the ophthalmic device stores predetermined reference information which corresponds various magnetic field signal characteristics each with a different respective direction of gaze. Based on the sensor information and the reference information, a controller of the ophthalmic device determines a direction in which the eye of the user is gazing.