Adding Unknown User Data To An Existing User

  1. Add the Javascript – See Personalization Engine Setup. If you are using Site Personalization Manager, see SPM Implementation.
  2. Data Collection – An existing user browses your site without logging in. The cookie sailthru_cid collects data regarding their visit.
  3. Pass Information – When the user is logging in, include the cookie in the User API call to update the user profile. For example:
  4. Copy
    {
        "id": "joe@example.com",
        "login": 
            {
                "site": "main",
                "ip": "127.0.0.1",
                "user_agent": "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3"
            },
        "cookies": 
            {
            "sailthru_cid": "U9JEVqLefidFAAAA"
            }
    }
  5. user POST (JSON)

Note: A best practice is to code instructions to clear the sailthru_cid after each user POST to an existing user. Failure to do so will result in duplicate sailthru_cid values.