Plugin Support
Kim L
(@kimmyx)
Hi @howdy_mcgee,
Thanks for the question!
“Manual Javascript” and “Manual” still mean the same thing in our plugin. (We’ll make sure to update those pages!)
This guide might be more appropriate for your use case: https://docs.wppopupmaker.com/article/230-create-cookie-on-the-click-of-an-element-within-your-popup
For an updated guide about manually creating cookies, you might also want to check this out: https://docs.wppopupmaker.com/article/555-a-beginners-guide-to-manually-creating-cookies
Let us know if this helps!
@kimmyx
Thanks for the reply! I did run across that help doc but what I don’t understand is that if my popup could set 2 cookies, how do I specify which cookie for PUM to set? I.E. in my popup instead of the default 1 cookie, I’ve created a 2nd cookie. The following code:
$('#popmake-1234').trigger('pumSetCookie');
Seems to trigger the Set Cookie Event but how would I go about telling PUM which of the 2 cookies I’ve created to set? If the Event accepts arguments I could pass the cookie slug in but after looking into this a bit I didn’t see that it did accept arguments.
Bel
(@belimperial)
Hi @howdy_mcgee
Thank you for your reply.
You can by adding the cookie name on the trigger.
Here’s an example:
https://share.getcloudapp.com/d5une8WZ
Then update the code to use the manual cookie you set on the popup settings.
jQuery('#popmake-xxxx').trigger('pumSetCookie');
We hope that helps. Let us know if you have questions.
Thank you!
Plugin Support
Kim L
(@kimmyx)
Hi there,
I’m going to mark this as resolved as we haven’t heard from you in a while.
Feel free to create a new thread if you have any other questions.
Thanks!`
Hey @howdy_mcgee,
Thanks so much for the excellent feedback on that beginner’s guide. That was super helpful.
I updated the guide to be more clear that the code sample will blindly create any Manual cookie you set up for your popup.
So, to selectively (or conditionally) create cookies, you can use a Popup Maker API to create a cookie with whatever name you want.
That’s all in the guide too with a link to a supporting code example.
https://docs.wppopupmaker.com/article/555-a-beginners-guide-to-manually-creating-cookies
Just adding my 2 cents in case anyone else wants to do the same thing as you.
Cheers 🙂
-
This reply was modified 3 years, 8 months ago by
mark l chaves. Reason: Clarification