This solution works for Auto Open/Time Delay, Scroll, and Exit Intent triggers.
Set Up Your Cookie #
First, set up your Cookie using the Manual JavaScript setting in the Popup Editor.
After clicking Add, you will be able to customize every aspect of how your cookie will behave. For detailed explanations on all of the cookie settings and features, check out the Cookie Settings and Features Doc.
Write your custom JavaScript function and use the “WordPress Way” of injecting your JavaScript code into your site via a PHP script.
Add Manual JavaScript #
You can add the PHP code snippet to your child theme’s functions.php
file or with a third-party plugin such as My Custom Functions.