Welcome Guest, Not a member yet? Register   Sign In
Can you store recommandations 'tags' in a session?
#1

[eluser]Christophe28[/eluser]
Hi,

I use encrypted cookies and the userdata of the session is stored in the database.

You know these recommandations on Amazon? When you have searched for a good JavaScript book and you visit Amazon next day there are all kind of JavaScript books as recommandations on the homepage.

I want to build something like that. I was thinking of storing the tags of pages users has visit and search queries in a column in the users table. But what to do with users who are not logged in? Can you store these tags in the session database? Something tells me this isn't the best solution ... Or maybe create a whole new table in the db, and store tags by IP address?

Has anyone experience with this, or a good solution for me?

Christophe
#2

[eluser]Dennis Rasmussen[/eluser]
Cookie for non-users and database with more data for users.
Or just cookies with simple data for both.
#3

[eluser]Christophe28[/eluser]
Thx!

I think I'll store the non-user 'tags' in the session table and the tags of the users in a column in the 'users' table, just like you meant I think.

Christophe
#4

[eluser]bretticus[/eluser]
You could optionally store a cookie for 30/60/90 days that has some unique token that references associated tags in the database. That way you have persistence and you can link up user accounts with the token data later if you want increased persistence. Anonymous users will remain anonymous but you will be able to profile them (this is probably similar to what Amazon is doing I'd assume.)
#5

[eluser]Christophe28[/eluser]
That's not a bad idea actually! I'll give it a look. Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB