Added insertscript to aggregate API filter field. Fixes #240.