Serverside Tracking

General discussion and Common issues in Server-side Tracking

Common Issues

Tracking Unidentified Users

The key to tracking events and properties of an individual is having an identifier that you can use to uniquely identify the user. In the case of "unidentified" users who come to your website, the identifier that Woopra uses is the cookie stored on the user's browser. The cookie is the lowest order of identifier in Woopra's Profile ID System.

As you learn more about a person, and get more unique identifiers for them, such as their email, you call identify() with those values, and Woopra will create a "mapping" for these identifiers. Whenever you send a track event or an identify call to woopra, it determines to whom the data is relevant based on this mapping of ids.

If you do not have any identifiers for a person who has visited your website, but still want to track events or identify traits on their profile from your server or another system, then you need to use the cookie to identify them. So you need to pass the Woopra cookie to your back end in order to use as an identifier for future calls.

The Woopra cookie can be accessed on the browser by window.woopra.cookie. Currently there is no function that calls a callback in case the cookie has not yet been set, so that logic must be handled by you.

Once you have that value on your server, you can then identify more traits about the user from your back end system simply by including that cookie in the request to the Woopra server. Please note that the cookie, is not a user property. As such, it should not be sent in the user object next to, eg: name, but rather on the track request itself. If you are using the HTTP Tracking API, this means that you do not prefix the cookie field in the request with cv_ or cs_. If you are using an SDK, you will have to look into the specific SDK documentation to determine how to send the cookie. If you are using Segment, see their docs.