Saving the URL during registration
Hope this will help you,

In Drupal 7

The best way to do is to create a new field for user registration form. Lets call the field as domain.

Steps:


Go to admin/config + Account settings + Manage Fields
Add new field

After adding

If you want to show this field in registration then check this


NOTE: If prefer do not show on registration form. May be there a chance to edit. Even though if your making it as disable, it can be change.

When ever the user registration form load, alter the form using hook_form_alter and give the default value for it.

function mymodule_form_alter(&amp;$form, $form_state, $form_id)  {
switch ($form_id)  {
    case 'user_register_form':
       //get field language
       $field_lang = field_language('user', 'field_user_domain');
       //assign default value
       $form['field_user_domain'][$field_lang['field_user_domain']][0]['#default_value'] = $_SERVER['HTTP_HOST'];
    break;
 }
}

When ever the users register the domain also saved.


You can use this field in views as per your requirement.