Hello, I'm giving a scenario more than a code to understand more.
Index - Shopping:
field - product id
field - time
field - customer id
field - event (- Value :Purchase)
Index- Cart:
field - product id
field - time
field - customer id
field - event (- Value : Clicked)
Index-Visitors:
field - product id
field - time
field - customer id
field - event (Value : Visitor)
I'm thinking to merge and make a sample index based on product id (which is more concerned for me). To have a idea on what products which really interest customers. If its generic, please let me know, what else information you may need. Thanks for your time.