Real time content personalization


I would like to personalize content depending users segment. For example change banner and hilight sections.
I did read some API documentation. I think it should be doable. If user gets identified (returning user) and belongs to some segment (default or custom) it should be possible to use ajax to load personalized content.

Has anyone tried to archieve something like this?