ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Session Question

June 03, 2010 11:34am

Subscribe [3]
  • #1 / Jun 03, 2010 11:34am

    zoltalar

    2 posts

    Hi all,

    This is my first post at this forum. What I’m trying to accomplish with EE is to store the timestamp of the first visit of a user in a site. So this would be a variable that gets set only once on the first page visit within the site. How can this be done, does EE support this? should I use native PHP to do this?

    Thanks in advance

  • #2 / Jun 03, 2010 3:21pm

    Herb

    224 posts

    Ok.  In order for EE to recognize that this is my first time to visit, it would have to be able to distinguish me from every other person using the internet.

    How about the date time stamp of registration.  This would be the join date from the exp_members table.

  • #3 / Jun 03, 2010 3:26pm

    zoltalar

    2 posts

    Members are taken out of consideration. This is for everyone visiting the site without the need of registration

  • #4 / Jun 03, 2010 3:39pm

    ender

    1644 posts

    you could write some PHP or javascript that creates a cookie in the visitor’s browser with this information.

  • #5 / Jun 03, 2010 4:13pm

    Herb

    224 posts

    Cookie would work, but you might really annoy people if they don’t accept cookies.  The would be treated like first time visitors every time.

  • #6 / Jun 03, 2010 4:37pm

    Wouter Vervloet

    758 posts

    Cookie would work, but you might really annoy people if they don’t accept cookies.  The would be treated like first time visitors every time.

    True.. but that would be the case anyway…

    I’ve written a plugin called Been There! that does roughly what you are looking for, but on a post by post basis. It uses cookies to store the state so it doesn’t work for everyone, but it’s perfect for it’s intended purpose.

    It shouldn’t be too hard to alter it to work for you… You can take a look at the source over at GitHub.

    Greetz,
    Wouter

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases