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

Popups aren’t bad. Bad popups are bad.

actually, it doesn't matter how you display it - Google renders pages when they're crawled, it's super easy to determine if it's legitimately a privacy/age popup or a marketing one...

Googlebot is stateless, meaning it can't render prior saved cookies or session storage. Display the pop-up via cookie or session storage, Googlebot cannot render it.

1730821515082.png
 
you really shouldn't trust chatGPT on stuff like this...

you can't execute site code with a cookie... or session storage. they are data saving elements, not rendering/execution elements...

you can set in session storage that a popup has already been executed and closed, so it won't display again - but that's just storing a temporary value in session storage, not the actual code of the popup.
 
you really shouldn't trust chatGPT on stuff like this...

you can't execute site code with a cookie... or session storage. they are data saving elements, not rendering/execution elements...

you can set in session storage that a popup has already been executed and closed, so it won't display again - but that's just storing a temporary value in session storage, not the actual code of the popup.

Absolutely you can. Set session storage, see if it exists, if so perform popup. If not do noting.


Example script initial visit.
JavaScript:
$(document).ready(function() {
 
sessionStorage.setItem('data', 'dataArr');
});

Example call. From 2nd page or returning visit.
JavaScript:
$(document).ready(function() {
    let dataForPopup = sessionStorage.getItem('data')
    if (dataForPopup) {
        // open popup Googlebot cannot store session storage so this isn't performed.
    }

});

Edit: fix shortcode formatting errors.
 
Last edited:
cracks me up how you think ChatGPT is smarter than Google...

Straight from Google.
  1. Don't rely on data persistence to serve content.
    WRS loads each URL (refer to How Google Search Works for an overview of how Google discovers content), following server and client redirects, same as a regular browser. However, WRS does not retain state across page loads:
    • Local Storage and Session Storage data are cleared across page loads.
    • HTTP Cookies are cleared across page loads.
 
ok man - I don't have the energy to continue to argue about this. WRS is Google's Web Rendering Service, and the text you literally cut-and-pasted into the thread says Google doesn't store local/session data across page loads... which means that if a popup is fired, and then the site is crawled/rendered again later, none of the local/session data is stored, so the page loads "fresh" - so I'm struggling to see how that supports your point?

The fact is this: you cannot launch code from a cookie. You cannot launch code from session storage that wasn't on the page when it loaded.

Google renders code - so it sees the code

Plus - no matter how much dealers love popups, customers hate them too. so there's zero reason to use them.
 
ok man - I don't have the energy to continue to argue about this. WRS is Google's Web Rendering Service, and the text you literally cut-and-pasted into the thread says Google doesn't store local/session data across page loads... which means that if a popup is fired, and then the site is crawled/rendered again later, none of the local/session data is stored, so the page loads "fresh" - so I'm struggling to see how that supports your point?

The fact is this: you cannot launch code from a cookie. You cannot launch code from session storage that wasn't on the page when it loaded.

Google renders code - so it sees the code

Plus - no matter how much dealers love popups, customers hate them too. so there's zero reason to use them.

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.

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');
});
 
but you're missing what I'm saying - the code is on the page. Just because it's set to not executed unless there's something in the local/cookie storage doesn't mean the code for the popup isn't on the page. Google can see that, so it still "counts"

In other words - Google sees all the code on a page, so even if you have that snippet in there and it doesn't show up for a human, Google still sees it, so you still get demoted...

plus, like I said - what's the point in arguing about it? Customers hate them, so why try to fool Google and use them anyway? (but you can't fool Google with this code)