How do they determine if it's primary or secondary raynaud's?

Look for diseases. When a patient has raynaud's phenomenon (vasospasm leading to poor circulation in the fingers and toes), his doctors will look for the common causes such as autoimmune disorders, drug side effects, hormonal imbalances, etc... If no medical condition is found that is causing the symptoms, then the disorder is called "primary". If a condition is found, then the disorder is "secondary".
Look for cause. If a cause for the symptoms is found, it is secondary. If no cause is found it is primary.