You can probably use the gitlab pages api to check if a project has any pages settings, see the docs: Pages API | GitLab
As for who visits the sites, you will have to use something like awstats to parse your Gitlab log files on your Gitlab server. Or some other solution that parses web logs.
If you are asking about this for gitlab.com, then you can probably use the API, but you won’t be able to parse web logs.