How product analytics work