That's already a function within your Google Analytics admin area. You can find the Google support info about it here: https://support.google.com/analytics/answer/1034840?hl=en