What is the version of the following sentence with correct punctuation?

It keeps track of how many times you look at a product as well and weights products accordingly
It keeps track of how many times you look at a product as well, and weights products accordingly.