Take a look at docs. There is cookie helper. Show ad to user who has no cookie, and set cookie expiration for 1 hour when they view the ad. However, CodeIgniter will not be able to make the ad "pop up" unless you use a nasty, blockable popup window using the javascript class. To do all of this you would be better off using JQuery and the JQueryCookie JS which will set and read the cookie using javascript on the client side!