Remove case sensitivity on referral domains

I’ve noticed that domain.com and Domain.com are being tracked as separate referrals. This means you have to manually combine these stats to get an accurate count. Case sensitivity is ok for the path portion of the URL but there’s no such thing as a case sensitive domain so it should ignore case.

Additionally, www.domain.com and domain.com are being treated separately, something that also throws off the referral stats. If there’s a bug report for this, someone should post it so we can track it. Otherwise, it should probably be added.

see http://dev.piwik.org/trac/ticket/1578

So how do I combine www.domain.com and domain.com into one referrer? Also it would be good to have ability to add whatever.domain.com sub domains as well. Unfortunately going to link Case-insensitive domain name matching · Issue #1578 · matomo-org/matomo · GitHub didn’t help me.