All Collections
Settings & How Tos
How can I stop showing notifications using code?
How can I stop showing notifications using code?

Learn how you can stop showing notifications on your website using code

Yosi Dahan avatar
Written by Yosi Dahan
Updated over a week ago

The ProveSource JS has a function you can use to stop showing notifications.

A known use case is Signed In visitors vs. first time visitors. You can identify your signed in visitors and stop showing notifications to them.

You can easily stop showing notifications by using this code:

provesrc.stop(DAYS);

DAYS is an optional parameter that sets the opt-out period.
The following code will stop showing notifications for the current session only:

provesrc.stop();

The following code will stop showing notifications for the current session and the next 5 days:

provesrc.stop(5);

Did this answer your question?