Your main problem is getting a transducer to convert the position into an electrical signal. Presumably you want to do this at very low cost. A linear potentiometer is a possibility or for more money you can get some very good and versatile laser position sensors.
If the action is driven by a servo then there may be an output you could connect to on the drive module itself, but that will probably correspond to speed rather than distance and it may be difficult to establish a calibration. You might be able to integrate the area under the velocity plot and compare that with total stroke.
What is the approximate maximum speed and total travel distance?
If you have access to a good storage oscilloscope you should be able analyse the output of the transducer on that. If you do not have one, look at http://www.picotech.com/oscilloscope.html