How can we help?

Ask a question or search our knowledge base:

 

 

Anonymous user activity

To get a score for a user, 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 option email address. If you aren't able to identify a return visitor to your site, you can use order id, for example.

You can link anonymous page activity with the user's API Events in two ways:
1. For one or more Events API calls, set both the user_id and session_id fields. The 'session_id' here needs to be the same as the one used in the JavaScript.
2. Use the $link_session_to_user API call.

Once this is done, then all previous and future page activity using the same session_id will be linked to the user. 

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).

Have more questions? Submit a request