Jump to content

Cookie help - fire on 2nd pageview


mealto

Recommended Posts

We run a cookie based popup (php script) that runs a popup for our newsletter sign up. It works when a user first visits our website and right away writes a cookie for 24 hours. Within this time frame, no popups are served. If they choose the "Never show me this offer" link in the popup, a 365 day cookie is written ensuring they will never (for 365 days) get the popup as long as the cookie is in place. Here is where we are stuck.

 

We want to delay the popup until the user views the 2nd page view on our site. So the first cookie write will need to write an integer to the cookie I assume, then on a 2nd pageview, have the script look for the integer and decide if the popup needs to be served. Is there a tutorial that can show us how to accomplish this? We are newbies and require the syntax for the script to read and write the cookie. Any help would be appreciated here.

Link to comment
https://forums.phpfreaks.com/topic/115362-cookie-help-fire-on-2nd-pageview/
Share on other sites

Thanks for the link corbin. We actually used that tutorial to set our cookies. The issue now is to leave some sort of trail so our popup fires on page 2 of the user's visit. Can you help?

 

For those who have cookies disabled, they will not get the popup. That is just something we have to live with.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.