mardi 12 décembre 2017

dynamic tutorial in javascript

There are many libraries that help to build overall tutorials and walk-through for web apps. But these are always procedural - user gets walked through a set of tutorials etc.

Best practice is though to have dynamic walk-through that reacts to users behavior based on events and analysis of what happens in the app.

For example:

  • user just loaded the app for the first time => we give user tip #1 and option to turn tips off
  • user does a few actions that we track and now we assume user will benefit from tip #2 and we show it as well
  • and so on.

So I decided to build a simple "engine" to generate those tips based on user actions. My initial idea was to use "buckets approach" - have a js object that has key "counters" which through user actions can be increased, then on every increase I would run a method that would check all buckets/counters to see if any bucket is filled now and thus should trigger a tip.

Question: is there any other pattern that can be applied for this use case?

Aucun commentaire:

Enregistrer un commentaire