Hello,
I'm looking to try and create a profile script that counts the number of times that a page has been visited by a visitor, and outputs that number. I also want to specify that once that number reaches a particular value X the counter resets to 1. Does anyone know how I can do this?
Thanks very much!
Solved! Go to Solution.
Views
Replies
Total Likes
Where the profile script is named "pageViews":
var count = user.get('pageViews') || 0;
count++;
if(count > 50) {
count = 1;
}
return count;
Views
Replies
Total Likes
Where the profile script is named "pageViews":
var count = user.get('pageViews') || 0;
count++;
if(count > 50) {
count = 1;
}
return count;
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Like
Replies