Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixpanel - Is there a way to distinguish first time visitors from others?

We have Mixpanel currently setup in our website, and we are following the recommendation around using alias (when signing up) and identify (when users logs in).

One thing I can't get my head around is if it's possible with Mixpanel to see the behaviour users (logged in or not) have on theirs first visit to the website.

Since Mixpanel uses a cookie, I supposed I could manually check that, but just wondering if there is something already built for it.

like image 972
frankmt Avatar asked Nov 16 '25 20:11

frankmt


1 Answers

You need to do this manually, there are no solutions for that task. Mixpanel was not created for tracking visits, new unique users are tracked in Google Analytics.

Mixpanel places a timestamp for every event you track. So, when you watch Retention it generally knows when the first ever event for each user occured.

If you want to analyze first visits in Mixpanel Funnels (not Retention) create event called "First Visit" and fire it using this scenario (you need to write additional code to your website of course):

  1. On each user visit to your website ask mixpanel cookie if it already has UserID, not just an AnonymousID (watch Resources-Cookies in Google Chrome developers mode for parameters))
  2. If it doesn't - fire IDENTIFY method (with anonymousID) and then your "First Visit" event.
  3. If it does - do nothing.
  4. Then, when user SignsUp - fire ALIAS method to merge previously identified anonymous visit with the newly identified registered user so that "First Visit" event will be tied to the registered UserID.

Note! This scenrio is suitable only if you use your own database userIDs and only if user visits your website from one device. (Unfortunately if user first came from PC and then registered from Tablet - the First Visit event tied in his profile will be from Tablet, not from PC. This is how cookie works)

like image 158
Many More Avatar answered Nov 19 '25 11:11

Many More