• Stop being a LURKER - join our dealer community and get involved. Sign up and start a conversation.

Reply to thread

You're not following the logic on how and when the popup code is triggered. The script onpage load, must detect a local/session/cookie is stored from previous page load before it fires the popup script.


The code I provided above does just that. Below is simplied version.

1. Page 1 loads, Sets a session/local/cookie. 

2. Page 2 loads and sees if that session/local/cookie exists, since GoogleBot doesn't save that local/session/cookie data across page loads, the conditional if statement is not met and the popup isn't rendered.


if (dataForPopup) will never be true for a GoogleBot, so the code within the if statement will never execute.


[CODE=javascript]$(document).ready(function() {

    let dataForPopup = sessionStorage.getItem('data');

        if (dataForPopup) {

               // open popup Googlebot cannot store session storage so this isn't performed.

        }

    sessionStorage.setItem('data', 'dataArr');

});[/CODE]