The disclosure relates to a sensor system for detecting a position of a movable plunger in a drug delivery device, the sensor system comprising a sensor capable of detecting a magnetic field, the sensor adapted to be fixed within a housing of a drug delivery device, and a ferromagnetic or permanent magnetic component magnetically interacting with the sensor and adapted to move relative to the sensor as the plunger is moved.