5 min read
How to Join Anonymous Visits to a Known Customer Without Splitting the Journey
Learn when to identify a visitor, how earlier anonymous activity is preserved, and how reset prevents identity from leaking between users.
· Tina
The short version
Most people do a few things before they sign in. They read a landing page, check pricing, look through the docs, and might come back a few times before creating an account. If tracking starts after sign in, all of that earlier activity is missing from the customer history.
So you track the person anonymously first. Once they have signed in successfully, you connect that earlier history to the stable user ID from your own app. This gives you the full order of events from the first visit onwards.
Track before sign in
Start tracking when the visitor first reaches the site or application. Grometrics assigns the anonymous activity to a visitor identity and records its sessions, sources, pages, screens, and events.
Do not create a new analytics identity when the person opens the sign in form. Authentication has not yet succeeded, and the submitted email or account name may be wrong. Continue the anonymous history until the application has a trusted signed in user.
Identify only after authentication succeeds
Call the Identify API after the application has confirmed the user. Send the durable application user ID used by your own system. A database user ID is normally safer than an email address because emails can change and may be shared or mistyped.
Identification tells Grometrics that the current anonymous visitor and the trusted application user belong to the same customer history. Earlier anonymous activity can then appear with later signed in sessions, product events, and revenue.
Identification should be repeatable. Calling it again for the same signed in user must not create another person. Avoid generating a new external user ID for every session or device because that defeats the purpose of a durable identity.
Keep trusted and untrusted values separate
The application user ID comes from the authenticated session. A user editable request value is not equivalent. Someone can change a form field, query parameter, or client request outside the normal screen.
When server activity is sent to Grometrics, use the identity established by the server after authentication. This prevents one customer from attaching events to another customer merely by changing a request value.
Reset before the next person uses the device
Call reset before sign out completes. Reset ends the connection between the browser or device and the signed in customer. The next visitor then begins with a separate anonymous identity.
This matters on shared computers, demonstration devices, and testing environments. Without reset, activity from the next person can remain attached to the previous account. That damages both privacy and reporting.
Reset should happen during the normal sign out flow. Clearing only the application session is not enough if the analytics identity remains active.
Verify the merge and the separation
Test with a new browser session. Visit from a known campaign, view several pages, create or sign in to an account, and trigger one meaningful product event. Confirm that the earlier anonymous activity and the later signed in activity appear in one visitor profile.
Then sign out, confirm reset has run, and continue browsing. The new anonymous activity should not appear under the signed out customer. Sign in as a different test user and confirm that the two customer histories remain separate.
So track the early activity, identify the person from the signed in session, then reset before someone else uses the device. The result should be one complete history for the customer and a separate history for the next person.
Use Grometrics to review the complete customer timeline from anonymous acquisition through signed in activity and payment.
READY TO SEE YOUR REAL NUMBERS?
Connect your payment provider and see which channels actually drive revenue.
Start tracking for free →RELATED POSTS