The invention provides a carpet unit comprising a laminate of a tufted primary backing layer providing a carpet unit top face, an intermediate adhesive layer, and a backing layer providing a carpet unit back face, wherein the carpet unit is selected from the group consisting a carpet and a carpet tile, wherein the carpet unit further comprises an optical sensor, arranged to generate a sensor signal, wherein, seen from carpet unit top face, the optical sensor is arranged behind the primary backing layer, and wherein the carpet unit is arranged to transmit light from the carpet unit top face to the optical sensor.