"user is anonymous" vs "user is returning", which one for first-time visitors?
Building a welcome experience for genuine first-time visitors and a separate one for people coming back.
I keep tripping over whether anonymous and returning are opposites. If someone is anonymous does that mean first time? Which condition actually expresses each case
2 answers
They are not opposites, they measure different things.
user is returning is about prior visits, it matches anyone seen before. user is anonymous is about identification state, it matches anyone who has not been identified via croct.identify. So a returning visitor can still be anonymous, and a first-time visitor can get identified the moment they log in.
A genuine first-time visitor is best written as the negation of returning:
not user is returningOne thing that surprises people: identity resolution links anonymous and identified profiles, so returning can hold for someone who has visited before but has not logged in yet this time. The returning vs anonymous thread digs into that overlap.
That cleared it up, I was treating anonymous as a proxy for first time which is where I went wrong
To make the welcome experience really only fire on the actual first page, combine it with the session check:
not user is returning and session is startingOtherwise a first-time visitor keeps matching on every page of that first visit. The session is starting thread explains when that flips.