Mix together the glycerin and xanthan gum until the xanthan gum is fully incorporated into the glycerin. Pre-mixing the xanthan gum into the glycerin will help ensure that you don't get lumps in your shampoo as xanthan gum can be tricky to mix into water.
Once you've incorporated the xanthan gum into the glycerin, you can begin to add the other ingredients. Slowly stir in each ingredient keeping in mind that vigorous stirring can cause foam production, making it more difficult to work with the shampoo.
Once you've finished mixing together all of the ingredients, check the pH of the shampoo with a pH test strip. You want your shampoo to fall in a slightly acidic range. (A pH of 4-5.5 is an ideal range to aim for.) You also want to make sure that the pH is suitable for the preservative that you are using.
If you need to adjust the pH, you can bring it down with the addition of a few drops of lactic acid or can raise the pH with either baking soda or sodium hydroxide (aka. lye). Otherwise, you are ready to bottle and use your natural homemade clarifying shampoo.