This change brings a new feature of the Android tracker (issue 519), released in v3.2.0 to the Java tracker. OkHTTP's CookieJar interface is used to store cookies from the event collector. The cookie can then be added to subsequent requests - the events will then all have the same network_userid.
There are some differences in implementation between Android and Java trackers. For Android, Shared Preferences is used to persistently store tracker state in the user's device. By storing cookies there too, they can be shared across instances of the CollectorCookieJar.
For the Java tracker, we currently only store things in memory. Cookies are stored in a static Set in memory here. Also, the architecture/naming around the HTTP clients is slightly different, e.g. Android has NetworkConnection while Java has HttpClientAdapter.
Having it off by default seemed like a good idea, I've changed it.
We could do with improving the docs for client-side users in general - it assumes server-side. Plus the tracker doesn't have sessions.
For issue #336.
This change brings a new feature of the Android tracker (issue 519), released in v3.2.0 to the Java tracker. OkHTTP's CookieJar interface is used to store cookies from the event collector. The cookie can then be added to subsequent requests - the events will then all have the same
network_userid
.There are some differences in implementation between Android and Java trackers. For Android, Shared Preferences is used to persistently store tracker state in the user's device. By storing cookies there too, they can be shared across instances of the CollectorCookieJar.
For the Java tracker, we currently only store things in memory. Cookies are stored in a static Set in memory here. Also, the architecture/naming around the HTTP clients is slightly different, e.g. Android has
NetworkConnection
while Java hasHttpClientAdapter
.