Yes, that would be what to do. Alternatively, you could measure your shocks at compressed and extended positions. Most shock manufacturers, such as Rancho, have charts that list compressed and extended lengths as well as mount types. If you know your stock measurements you can pick one that suits your lift.
Ideally, you would measure the distance between your shock mounts on your rig with the suspension compressed and at full droop and choose a shock with travel within those measurements.