Sign in to Community
Sign in to view all badges
Is there a library of profile script to achieve the use case in which we want to display the previous visited pages or categories
please refer this - https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/variables-profiles-p...
also, you can code something like this. just sample but you can develop better using above info
//do somethign for first time
//do something for returned users