Lightbox Help

Hello All,

I was looking for some help using lightbox. I have 4 contact information lightboxes setup on my page, and testing them works. However, I want the ability to see which page grabbed the information. Right now, it says in the received email, that it came from our page’s domain, but I want to see which page it actually come from. That way we can better identify which marketing copy is working.

example:
(This is the current message)
"You received a new message:
Via "www.“domain”.com/

(This is what I hope to see)
"You received a new message:
Via "www.“domain”.com/“page”

Thank you all in advance for any help you can provide!

Hi,
In order to know which page you came from you need to send the path of your page to the lightbox when you open it using the openLighbox function, your page code should look like this:

import wixWindow from 'wix-window';
import wixLocation from 'wix-location';

export function button2_click(event, $w) {
	wixWindow.openLightbox("Welcome", wixLocation.path);
}

to get the data in the lighbox use the function getContext like this:

import wixWindow from 'wix-window';

$w.onReady(function () {
	console.log(wixWindow.lightbox.getContext());
});

Good luck :slight_smile:

1 Like

Hi Ox,

Thank you for your reply, I want to be clear, which are the parts I modify? The green text?

Hello Sir,
I have added lightbox on this page https://www.wellsquarednutrition.com/wellsquared-weekend
I wants to remove the lightbox after user enter their email and click on subscribe button.
I have also added this code in my footer but it’s till not working.