How can we help?

Ask a question or search our knowledge base:

Anonymous user activity

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.

You can link anonymous page activity with 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' needs to be the same as the one set 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 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).

Have more questions? Submit a request