Adding Anonymous Data To An Existing User

Walkthrough

  1. Drop Horizon Javascript – Include the Horizon Javascript in your site’s code


 

FURTHER INFORMATION:
Horizon Setup

  1. Data Collection – An existing user browses your site anonymously. The cookie sailthru_cid collects data regarding their visit.
  2.  

  3. Pass Information – When the user is logging in, include the cookie in the API call to update the user profile. Here is an example:
  4.  
    user POST (PHP)

    {
        "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"
    	    }
    }
     


 

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.

Top