Expose tracker user id so it can be displayed to users

We use a snowplow mini instance in development. Consequently, many events from different users hit the snowplow mini instance. It is difficult for people using the instance to determine which events are associated with the interactions they performed on the client. We would like to exposed the userId so that one can filter events in Kibana by their userId and easily associate events with their client.

The Android tracker allows you to obtain the userId via:

tracker.getSession().getUserId();

It would be nice for the objective-c tracker to also exposed this id.

Additionally, it doesn’t seem like one should need a session in order to view this data. Perhaps the userId should be available from the tracker itself?

Hi @dcow,

I see your point it would be good to be able to access that in both Trackers. As a workaround however you can actually set your own user id through the Subject object as documented here:

This should hopefully provide you the mechanism for filtering without needing to access the client session object.

I have however added a ticket to put getters in place for this objects values:

Hope that helps,
Josh

Awesome! Thanks.