They use a vulnerability in Google Analytics to make fake visits so the only way to stop them for now, and until Google fix it, is to make a filter in GA since that is the source of the problem.
Blocking them in the
.htaccess file is pointless since this kind of Spam never visits your site.
Check this answers for more information about this spam https://stackoverflow.com/a/29312117/3197362
And this for Referrer Spam in General and some methods you can use to filter them and stop future occurrences https://stackoverflow.com/a/28354319/3197362
As for the previous/historical data, you can use segments in Google analytics. Create a REGEX with the Spam names something like this:
You can add as many as you want, but the REGEX has a 255 character limit. You can add multiple conditions if this happens
- Go to the Reporting section in your Google Analytics.
- In the lateral bar, expand Acquisitions > All Traffic and Select
- In the main board Click on +Add Segment.
- Click on New Segment.
- Select Conditions Below Advanced.
- Set filter as Exclude. Change Ad Content for Medium and contains for
exactly matches and type and select referral in the text box.
- Click on AND
- Change Ad Content for Source and contains for matches regex and paste
the Spam Regex.