@getaway shootout you should mix xantham gum with glycerin and a small amount of water (about 10-20% of the total water phase) in a separate container. Use an overhead stirrer or a high-speed blender to ensure thorough dispersion and avoid clumping. Allow this mixture to hydrate for at least 30 minutes, or even longer, depending on the desired viscosity.
After the xanthan gum/glycerin/water mixture has fully hydrated, slowly add the surfactants while mixing continuously. This helps to evenly distribute the surfactants throughout the mixture and prevent clumping.
And remember that the temperature can affect the viscosity of the mixture. You can try to maintain a consistent temperature throughout the mixing process.