A simple segmentation and targeting framework written in JavaScript