JS: making product_visit unique