User Identification: Knowing Who Your Visitors Are

Learn how to identify users in analytics. Track logged-in users and understand individual visitor behavior.

Draft

Most visitors are anonymous. You know they visited. You know what they did. But you don't know who they are. A repeat visitor is counted as a new visitor each time they come back. You can't see their lifetime value. You can't see their journey across sessions. User identification solves this. When a visitor logs in, you capture their ID. You track them across sessions. You know who they are. You understand their behavior over time. This transforms your analytics from anonymous to personal.

This article explains how to set up user identification in analytics.

Understand Anonymous vs Identified Users

Anonymous users are tracked by cookie or device ID. You know their behavior but not their identity. A visitor visits three times. Analytics counts them as three different visitors.

Identified users are tracked by a user ID. You know their identity. A visitor visits three times. Analytics counts them as one visitor with three sessions. You see their full journey.

Most visitors are anonymous. Some become identified when they log in. User identification bridges the gap.

Capture User IDs When They Log In

When a visitor logs in, capture their user ID. Email. Username. Internal ID. Send this ID to your analytics platform.

Most analytics platforms have a User ID feature. In Google Analytics, set the User ID. In a CDP, set the user_id. Every platform has a way to identify users.

Send the user ID immediately after login. Don't wait. Don't guess. Get it from your authentication system. Your system knows the true ID.

Link Anonymous Sessions to Identified Users

A visitor browses anonymously. Then logs in. How do you connect these sessions. Most analytics platforms do this automatically. When you set a User ID, the platform retroactively links previous sessions.

Check your platform's documentation. Some require special configuration. Some do it automatically. Make sure it's working.

This retroactive linking is powerful. You can see the entire journey. What the visitor did before logging in. What they did after.

Set User Properties

User ID is just a number. User properties add context. Customer type. Account plan. Signup date. Annual value. These properties describe the user.

Send user properties along with events. When a user makes a purchase, send their customer type. When they view pricing, send their current plan. Properties add context to events.

Properties let you segment analysis. Compare how premium users behave vs free users. Compare long-term users vs new users. Properties enable this segmentation.

Handle Logged-Out Users

When a user logs out, stop using their User ID. Switch to anonymous tracking. This respects user privacy. You're not tracking them after they explicitly logged out.

In your analytics code, when logout happens, clear the User ID. Let the platform know the user is no longer identified.

Respect User Privacy

User identification requires care. You're tracking individuals. Users expect privacy. Be transparent. Tell them you're tracking. Get consent if required.

Don't send personally identifiable information directly to your analytics platform. Send hashed or anonymized IDs instead. If you must send email, hash it first.

Have a data retention policy. How long do you keep user data. Delete old data. Respect user request to delete their data.

Analyze User Behavior Over Time

With user identification, you can analyze long-term behavior. How does lifetime value change over time. What features do long-term users use. What do they avoid.

Compare cohorts of users. Users who purchased immediately vs users who took weeks. Users from different channels. User identification enables this analysis.

Frequently asked questions

Do we need user identification if most visitors don't log in?

Yes. Even if 10 percent of visitors log in, that's valuable data. You understand their behavior. You can correlate login with conversion. Plus some platforms let you identify users without login using email or phone. With WEMASY's website builder, you can set this up directly on your website.

Is user identification a privacy violation?

No if done correctly. Users log in voluntarily. You're tracking their behavior on your own site. This is standard practice. But be transparent. Tell users in your privacy policy. Get consent if required by law.

Can we use email as a user ID?

Yes but hash it first. Hashing converts email to a string of characters. It's anonymized but consistent. Same email always produces the same hash. You get identification without storing raw email.

What if a user logs in from different devices?

The User ID links them. Same user ID on both devices. Analytics sees it as one user using multiple devices. This gives you cross-device view of user behavior.

How do we handle users who share a device?

Log out when they're done. When one user logs out, log in as the next. Their User ID changes. Analytics treats them as different users. This prevents cross-contamination.

Can we retroactively identify users?

Most platforms link anonymous sessions when you set a User ID. But there are limits. Some platforms only link recent sessions. Check your platform's limits.

Put it to work
on your own website.

Start free with WEMASY and build your site in a few minutes.