Tracking state of a one time event on a big website
Posted
by
Mattis
on Pro Webmasters
See other posts from Pro Webmasters
or by Mattis
Published on 2013-11-11T11:59:37Z
Indexed on
2013/11/11
16:16 UTC
Read the original article
Hit count: 356
Assume a website with 250 million active users.
I add a new feature to the website. Once a user visits I want to use a short tutorial to teach them how to use said feature. I only want them to complete the tutorial once (or actively click it away).
What is the smart way to code the verification check for this? How do I track the progress in the database? Having a separate table with like NewTutorial_completed = 1 for user_id = 21312315 would just snowball. It also feels intuitively bad to check for every one-time event for every user on every page view.
While writing the question I got one idea, to have a separate event log that is checked periodically for any new action the user need to see or perform. I push events to this log and once they are completed they are removed from the log. No need to store NewTutorial_completed = 1-type variables this way.
I am sure this is a common problem. I would appreciate any input on what best practice is.
© Pro Webmasters or respective owner