Added the ability to only apply aggregations if the activity has a certain key value pair