0

I would like to keep track of the number of visits for each anonymous user. I want to be able to show special messages, for example when they visit the site the 10th time.

Incrementing a cookie variable will just be fine in this case. How do I find out when a new session has started?

1

3 Answers 3

1

This would be difficult I believe, because every anonymous visitor is essentially treated as the same, as one account.

0

You are most likely best to make use of session_api module and some custom moduling.

1
  • Session may be cleared when user leaves the site.
    – Mołot
    May 16, 2013 at 11:32
0

Needed functions are readily described in manual: http://api.drupal.org/api/drupal/modules!user!user.module/function/user_cookie_save/7

Don't forget to respect Do Not Track or you risk a lawsuit in some jurisdictions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.