After even more tries it’s apparent that it doesn’t work properly even with the Twenty Thirteen theme on a clean WP installation, on a different web host – it sometimes seem to work for a bit but after a few tries it doesn’t.
The problem is that the session-variable that increases for each page view doesn’t always increase in in steps of one. It rather acts as if there were page views between my views – only I’m the only one surfing the development site and I’m the only one on the clean WP installation as well.
These rows of the generated script (shown around row 80-90 or so, depending on theme used) shows where it goes wrong.
On first page view:
if ((($.cookie('displetpop_recentpop', {path:'/'}) != 'yes' && '1' >= '3') || ('' == '1' && '' == '1')) && urlmatch != 'no'){
On second page view:
if ((($.cookie('displetpop_recentpop', {path:'/'}) != 'yes' && '3' >= '3') || ('' == '1' && '' == '1')) && urlmatch != 'no'){
On third page view:
if ((($.cookie('displetpop_recentpop', {path:'/'}) != 'yes' && '4' >= '3') || ('' == '1' && '' == '1')) && urlmatch != 'no'){
See the ‘1’ >= ‘3’, ‘3’ >= ‘3’ & ‘4’ >= ‘3’?
Sometimes the numbers are 1, 2, 4 instead and rarely it works properly as 1, 2, 3.
Since this has happened on two completely separate servers (different web hosts) as well as with both with our custom theme and the default theme, with and without the other plugins we use, it seems like it should happen to other people as well.