Pregunta

With Sitecore DMS you can create Profiles and show specific pages based on the user's visiting habits. This information is stored using a cookie so whenever the user comes back they have the same visitor profile. But if they delete their cookies or switch browsers that information is gone. Now what I want to do is save this visitor information to a sitecore user, in that they can log in and their visitor profiles will be the same as when they left, no matter where they are or what browser they are using. I've been trying to figure this out for a while now but without success. Whenever I login with a user and create a specific profile, that profile is deleted as soon as i log out. Is this even possible for Sitecore, because it seems rather silly to only have profiles based on cookies when cookies are deleted constantly.

¿Fue útil?

Solución

With Sitecore Analytics, you have two tracking cookies, one is for Session--the other for GlobalSession (which doesn't expire across normal asp.net sessions). Unfortunately, Sitecore doesn't track profile key scores based on GlobalSession, but by a single asp.net session. The entire system is based around this, and it's very disappointing. '

To get around this, I was using OMS and use Reflector to disasssemble and rewrite some of the analytics code to record by global session. It also required a couple of schema changes as well as new rules... pretty extensive work. At the end of the day, because of the size of the database and our need for a very limited number of features, I ended up creating a single table and recording profile key values in that by globalsession.

From what I understand, the schema has changed from OMS to DMS, but the single most important factor, that data is recorded by session, has not changed.

With regard to storing the User's id, you can associate this with a 'tag' which is stored, I believe, with the globalsessionid, at least in OMS. However, Sitecore doesn't update the tag records, so you'll end up with multiple records per global session. If you're storing this value on every request, that table will bloat quickly.

Otros consejos

There are a couple of reasons for this... not the least of which is that in many cases, you don't have a logged in user to correlate this information with. The profile data isn't stored in cookies... it's stored in the Analytics table. But it's associated with a cookie that has a unique ID and once that has been deleted, the ID (hopefully!) won't be used again.

A suggestion for how to get around this here in this StackOverflow answer.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top