Home » Support » Docs » Other information related to the cookie-notice

Other information related to the cookie-notice

Updated on

Added in WP Full Picture 3.3.0

How to trigger JS functions after users agree/decline cookies

When a visitor clicks any of the “accept / decline” buttons in the cookie notice, WP Full Picture sends a custom JavaScript event. You can use this event to trigger any other JS scripts.

Example:

document.addEventListener('fupi_popup_closed', function (e) {
	console.log(e.detail); // e.details holds information what button was clicked
});

Please, rate this article

Like / Dislike
It's good that you like it. Click the button below to send us this info. Thanks :)