Show the lightbox once to the visited IP address

Question:
The lightbox automatically triggers on home pages in all languages. I want to trigger it only in the main language or trigger it to each IP address once.

Product:
Wix Studio

What are you trying to achieve:
When they first enter the site, my client wants to show a logo and language options below it. When I do this with a lightbox, the visitor selects the language and the lightbox opens again in the chosen language. This feels like a loop. Is there a chance to trigger the lightbox once based on the visitor’s IP address?

What have you already tried:
I couldn’t find any relevant topic and I have no idea about this.

Additional information:

Rather than IP address, you should just set a flag within the local storage

An IP can be shared by many machines, and a machine by many users. By setting it in the local storage, it is the browser that remembers it until the user clears their cache

1 Like

Hi, olcaybgc !!

To obtain an IP address, I believe using a third-party API will likely be necessary. Also, combining it with the method that DeanAyalon suggested using storage seems like it could lead to an efficient way of identification.

Of course, I believe that some explanation to the user about the legitimate reasons for obtaining their IP address is necessary. :thinking:

So, instead of obtaining the IP address, I should find a way to solve this problem another way.

There are many approaches to it, obtaining the IP will introduce quite a few other problems

Usually for stuff like that, the browser’s own “memory” (not literal RAM) is used in the form of local- and session-storage, and cookies