Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!

Correct session cookie handling / expiry

Avatar

Level 4

4/5/13

Currently s_code uses a session cookie to store specific information - ie getValOnce information.

The session cookie is only deleted when the browser is closed.

For Sitecatalyst the visit expires after 30 minutes inactivity.

Thus if a user returns after more than 30min we get a second visit, but all variables using getValOnce stay empty and report "none".

 

Therefore session cookies should be appended with a timestamp of the last tracking call, which is updated on every tracking call.

If the timestamp is more than 30min ago the cookie needs to be deleted before any other logic get applied.

This way browser close AND 30min timeouts get reflected correctly.