Close Popup and Create Cookie After MailChimp with Popup Maker Submission

This solution works for Auto Open/Time Delay, Scroll, and Exit Intent Triggers.

Setup Your Cookie

First,  setup your Cookie your using the Manual JavaScript Cookie Creation Event 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.

Use the method documented  here to create your Cookie on form submit.

Add Manual JavaScript

Add the code below to either your parent (or child) theme's functions.php file, or within the 'My Custom Functions' plugin. The latter will preserve your custom code if your parent theme updates.