The only way to do something like that is with the "Events" feature, which is only available with the Pro plan.
When you create an "Event" you can require that anyone viewing the event to register. Please see this for more about using this feature... https://help.smugmug.com/create-and-share-events-r1qEllD1VrG
Other than that, there is not a way to collect the information about who is viewing your SmugMug galleries.
Please feel free to leave this as a new feature request:
Many new features have come from this!