Script help
- Started
- Last post
- 4 Responses
- story
Need a script that will open up a pop up on exit but that pop up will only pop up every 10th visit or so.
Can anyone help?
Thanks.
- story0
Anyone?
- joyride0
not sure how you would track the 10th visitor. Since a javaScript could count a variable, but it would be unique to each user. you could have a var = random number 1-10 and if it matches say 5 do the popup. It would be about 10%.
Does that help?
Search javascript pop up window and then add the random number and if statement... I know you can do it!
- acescence0
if you're tracking visits on the client side, you need a cookie, no?
or are you wanting to track server side, ie, the 10th visit from any user?
- story0
Yes 10th visit from any user....
also the it doesn't really matter what number of visits, just so that it pops up on exit at a random time.
So far I have code that can make a pop up on exit, but not randomly.