To get a score for an action a user takes on your site, you will need to send their events with a unique value for the $user_id field so that you can ask for the score attached to that value. If you do not generate user ids, a common alternative is to send email address. If you aren't able to identify a return visitor to your site, you can use order id. Please work closely with our Sales Engineering and/or Support Engineering teams to find the identifier that works best for your use case.
Once this is done, then all previous and future page activity using the same session_id will be linked to the same user identifier.
Also refer to the tutorial about anonymous user activity for information on how to set the session_id field in the JavaScript snippet.
Note: These instructions also apply when sending anonymous Events (for example, when an $add_item_to_cart event or a failed $login event is sent and a $user_id value is not available).