Merge referring subdomains of domains to domain


I have traffic incoming from subdomains of domain
Is it possbile to save/display it all as it would be coming from I’d like to be able to easy see how much traffic comes from in general, not per subdomomain.
Maybe a str_replace hack in source files ?