Asking users how they heard about us

When is the best time to ask the user the question, "How did you hear about us?"

We haven't fully decided how to best phrase this question, but how do you bring this up contextually to a user?

We'd like to expose this question to everyone, if possible, and not just those who try to reach out to us through the Contact form.