What if the reason the shock broke is because someone put a budget boost, or linger springs on it but used the wrong shock size in the first place?
The best way is to cycle the suspension and get your collapsed length measurement. If you've already got proper bump stop length you're good, otherwise you should deal with that too. You can buy shocks based on generic "lift ranges". It'll be close, but on which side of the line will it be? Breaking stuff that costs money because it isn't set up right isn't the way I roll.