I wanna stick a pop under on my pages but I dont want it to pop up on every page, just once per unique user. I got told I could do this with javascript but have no idea where to begin? Thanks
Using cookies is the easiest way to do it by using only JS code. (note that some people disable JS) Other way to do it is to add a parameter to the query string ... this solution will be nightmare to maintain. If you have access to the server code - Using the session object is the right way to do it...
There's more chance to correctly track unique users by using sessions if most of your users are using shared computers. Otherwise, if they mostly use their own, and you really want to track each computer (and assume 1 computer == 1 user), then use cookies. Of course you can always "mix and match" this by using cookies with shorter expiry time.
Hope this can help. <? if(!isset($HTTP_COOKIE_VARS['unique_visitor'])){ setcookie("unique_visitor", $value); ?> <SCRIPT LANGUAGE="javascript"> <!-- window.open ("popup.html","popup"); --> </SCRIPT> <? }; ?> Code (markup):