I have a cookie set with expiry of 3 mins, this will allow a user to navigate through the site for 3 mins before seeing an advert. They will see the ad if cookie is not present on next page they visit and the cookie will be reset once the ad is closed.
However a consequence of this is that as soon as the website is visited the ad will show, how can I stop the ad showing on the first page a visitor lands on?
If you only want to use cookies: You can add another cookie to the site, set it to expire after the browser is closed, and only show the ad if this cookie is set but the other is not.
Alternatively use session like methods, like storing in a session the time the user has entered the page, and calculate when to show the ad from that time. This also means you have to check for the ad showing an other way (checking the value of the session variable), not via cookies.