-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Changing the User ID starts a new session in the server #209
Comments
The overlying reason to split up the injection was to reduce network traffic, but I wasn't aware of the fingerprinting mechanism when implementing that. Can we come up with a better solution than to just inject these parameters into every event so we can still try to prevent unnecessary traffic? Maybe once after the id has changed? |
We can add a simple |
That could work, but I'm not sure if just an What would happen if two threads call |
Yes you're right, that would be a problem. If they are different, set the Maybe I should change the name of the |
That would work but the code might be too complicated for my taste. I'll have a look at the synchronization code again later, I think we can simplify the whole
That's a cool idea, saves us an extrar global var. 👍 |
* Fixed bug related to session not timing out correctly due to start-time being updated too often + tests * Updated supportlibs to fix complaints
@d4rken yep, looks good to me. Also nicely done with the code cleanup :) |
* Version bump * Fixing bugged server-side stitching, see #209 * Fixed bug related to session not timing out correctly due to start-time being updated too often + tests. Every new-session check updated the session-start-time (see https://github.com/matomo-org/piwik-sdk-android/compare/master...d4rken:pr-trackingfixes?expand=1#diff-882f28170086757965fd93d903fa5bfdL180) * Updated supportlibs to fix complaints
v3.0.3 is available and contains the fixes. Thanks for teaching me about the server-side stitching 😃 |
As opposed to the Web & iOS SDKs, when updating the user ID during a visit and sending a new event, the
idvisit
of that event is greater than theidvisit
of the last event that the same user has created.The Web & iOS SDKs conform the fingerprint concept that Matomo uses to stitch 2 visit with different
user_id
s.The Android SDK does not conform as it only sends the required event parameters at the *very first event of the visit (via the
Tracker::injectInitialParams
).The solution would be very easy, simply move the following 3 lines from the
Tracker::injectInitialParams
to theTracker::injectBaseParams
.With that being said, was there a reason that those parameters where not included in the
Tracker::injectBaseParams
to begin with? If not, I would be happy to provide a PR with the aforementioned solution.The text was updated successfully, but these errors were encountered: