You need to take measurements for fully compressed and fully extended.
1. Remove your current shocks.
2. Flex the axle until one side hits the bump stop. You might be able to do this with a jack. If not, look for someplace (loading dock, ditch, etc.) that will flex out the suspension.
3. Measure between the upper and lower shock mounting points. Shock measurements are from eye-to-eye, so you measure between the mounting points where the shock eye will be located once it is installed. This would be the center of the bolt hole on the lower shock mount. On the upper mount, its where the bar pin is, and again, you measure to the center.
4. Flex the axle until one side is at full droop. Ideally you want to get your rear tire just slightly off the ground so you know for sure its at full droop.
5. Measure again using the same procedure described in step #4.
Now you can compare your measurements to the shock specs to be sure that you're getting a shock that is short enough when at full compression yet long enough when fully extended.