Mixpanel user tracking- track registred user from different device - tracking

I am using mixpanel user profile tracking.
1 : If a new user, say A , visit my site and go through some pages without sign-up. That time mixpanel is tracking events to a unknown profile.
2 : Then the user A, sign up in my site and placed an order.
That time mixpanel is tracking previous events and the events after sign up also to a the same profile. (mentioned in above point).
3 : Then the user comes to my site using his mobile, then he go through the pages without login
That time mixpanel track the events to different a profile.
4 : The user then logged in in his mobile and continue to place order.
Then the mixpanel track events after the login into the previous profile mentioned in the 1st and 2 nd step.
My problem is I would like to re-map the tracking done in the 3rd step also to the profile which is used to track in 1st and 2nd step

There are 2 routes
1-) Queue anonymous events: the idea would be that instead of sending Mixpanel the events when the user is still anonymous, you save them either on the device (if it's a mobile app) or on your server. Then, when the user logs in, or creates the account, you can flush the stored events since now you know who the user is. As you might realize, the downside is that if the user never logs in or signs up, then the events are never sent (unless you build a mechanism in your server to flush them in that case).
2-) You could so as you currently do, but when the person goes to step 4, and logs in, before changing the ID to the correct one, you could create a People profile with the anonymous ID, mark it with a flag that it's an orphaned profile, and save the correct ID for it. That way, you can schedule a task to look at those profiles every so often, export their events, and import them back with the correct ID. That would essentially duplicate the data for those events, but you would have the full history with the correct ID. You could also try to filter events based on the "orphaned" flag later on, but it does mean you will always have to have it mind.

Related

Netflix like concurrent user limitation on logging in

I am new to Shopify and exploring options to run a streaming service. I want to build functionality through which I am able to limit the number of users concurrently login through a particular account.
That is if say 4 users are logged in through user A it should not allow 5th user at the same time (Based on plan) as people share their login credentials. Does Shopify provide this functionality or any good recommendation of any such app?
You can check this app . This is solving similar problem not sure how they are doing it though .
You can configure this app easily and set your custom banner for 5th user (In your case) or also force log out the first user in case of 5th user attempts to login.

Administration of telegram channel

I get into a problem with the Telegram channel,
one person creates a channel and adds other administrators to it,
then she removed her telegram. and now it is needed to add another telegram administrator to that channel.
As I understand, the only channel creator can add a new admin of the channel.
So.. what should I do?
I think even she(channel creator) reinstalls her telegram, she can't add a new admin to the channel...
if someone deletes their telegram account then bots they created are deleted, and groups or channels lose their master and no one gets the master card
https://telegram.wiki/privacy/accountdeletion
What happens after account deletion?
User will get automatically logged out of their Telegram clients.
Username and the phone number of a deleted account immediately become available to reuse.
If the user recreates the Telegram account with the same phone number, the TQ will change.
The account will have the same phone number but will be a fresh new account with a different unique ID (#tq number).
TDesktop (Windows) will still show the old account's display name, even after restarting the client. The name does not change to DELETED / Unknown / Hidden Name, etc. This is at least if you had a previous chat history with the old deleted account. If you re log in, the name will show as blank (no name at all). Other Telegram clients may display deleted accounts as DELETED / Unknown / Hidden Name, depending on the client and language/translation strings.
User's last seen will display as “Last seen a long time ago” in modern clients (“offline” in very old clients)
You can still type to a deleted account, but the messages will never be received by the Telegram servers. They will always show a clock icon, instead of 1 check.
Bots created from a deleted account are deleted too and their usernames become available to reuse.
Groups and channels aren't deleted and stay orphaned (no one gets privileges of the creator).
update: I'm a quite sure telegram was updated so that if an admin leaves a group or channel (by manually leaving or deleting their account) then the user who was connected for the longest gets the admin control... (bots still lose their admin and become useless)
(I couldn't quickly find the source for this, quite sure it was in one of the update telegraphs they sent when the change happened)
Telegram doesn't work like that. It is completely on the cloud. This means that if she reinstalls her Telegram app, it will be as if she hasn't uninstalled it. (Uninstalling is different from removing your account)

send notification to a particular user with notification hub - Azure and GCM

I am a software developer in Xamarin - Android, I want to create notification messages. For this purpose I use Azure notification hub, combined with Google's service - Google Cloud Messaging (GCM).
My problem comes when I want to send notification to a particular user. I realized that I need to use the "TAGS" When I compose a new user to the system (Uniqe TAG)
Indeed, it works great, but when the user logged off his account, and then connect to another one (with another TAGS) - the TAGS of his old account are kept in a certain time, and he continues to receive personal messages from the previous account!!!!
Does anyone know what can be done about it?
thank you very much
This is actually an issue a lot of people/apps have on iOS and Android.
What you should do is:
Register your app at your Azure Notification Hub (ANH) on first start and reregister at every app start, to keep registration in sync
If a user logs in, update the registration with an additional tag for this user (e.g. "user:XY")
Sending notifications to that user tag will of course result in notifications on all devices the user is logged in on
If a user logs out, update the registration without the user tag (omit the user tag, so the registration doesn't have user tag anymore afterwards)
The registration will be updated immediately on ANH and sending notifications to the user (tag) will not result in notifications on that specific client
If the user can logout on your app without internet connection, you won't be able to update the registration of course and you will still have the problem of getting notifications for a logged out user. But as soon as another user logs in, the registration should get updated with the new user tag and everything should be fine again...
What you shouldn't do:
"Developers should never unregister the client app as a mechanism for logout or for switching between users..."

How to build a jabber client using libstrophe

I'm trying to make a simple Jabber client using the libstrophe library.
It's going fairly well so far, except for one thing for which I need some clarification.
Namely, how am I supposed to (continuously) know the status (i.e., Online/Offline) of contacts, so that I can display it to the user of my program? Similarly, how am I supposed to request the roster of the user?
I've looked at the roster.c example provided by libstrophe, but that only prints out the roster once. In a real application, I'll need to request/update this continuously, in order to show any new contacts the user added, etc., in the application.
So basically, I'm unclear on how to make sure that I always display the most current roster and most current statuses of people in my user's contact list.
Am I just supposed to request the roster at some predefined time interval, for example?
roster and presence are 2 different topics.
When you login you normally request the roster which you are doing already. When your contact lists changes during your session you get a roster push with the updated contact. This is an stanza. It doesn't matter if another logged in client manipulated the roster our your client.
The online state called presence of all your subscribed contact comes in with stanzas.
You have to setup handlers with xmpp_handler_add for
Online state, presence stanzas
Roster pushes, iq stanzas with query of namespace jabber:iq:roster

Google Analytics & Event Trackers - how to get traffic source by event?

I'm using a google events tracker like this:
_gaq.push(['_setAccount', 'UA-1422398-23']);
_gaq.push(['_trackEvent', 'BookingRequest', 'Parent Name', $('#parent_fname').val()+' '.$('#parent_lname').val()]);
In this case, let's say I can track how many requests were submitted.. is there a way to track these specific users, and see the traffic source, and if it's Google, then what keywords they searched my website by?
Basically I want to see the people booking online, and see how and where they got me... and hoping there's a better and more elegant way than to have a field that asks "What did you type into Google to find us?"
Putting fname and lname into GA is a violation of Google Analytics terms of service. See number 7 PRIVACY.
Custom vars can be used to determine user type and/or login status. See Session-level Custom Variables
For example, if your website offers users the ability to login, you can use a custom variable scoped to the session level for user login status. In that way, you can segment visits by those from logged in members versus anonymous visitors.
But, don't try to put the username in GA either:
While the username or user ID is not directly PII, if it is used to tie to a person from a backend system…that’s a violation of the Terms of Service.
To see the traffic source of the events, go to Content, Events, select the event you want, and add the secondary dimension of Traffic Source (just above event title in report).
Here is a Custom Report for Event Labels that drills down by source then keyword. Just log into GA and go to the URL.