Full Description, Documentation & Screenshots: link
We hope you enjoy using this plugin to add Cookies feature to your Bubble apps. No matter where you are in the world, stay safe, stay creative, and stay connected to each other!
Hi @BubbleSam . I’m considering using this to create a cookie consent/settings area for my site’s users.
I have a couple questions after checking out the demo/editor. Let’s say I want to use this to ‘write’ my google analytics cookie.
where do you suggest I place the cookie script?
what do I use for the ‘value’? your example looks like a Bubble DB value, but the plugin description states that you’re ignoring the DB. Would you suggest that I store all of my cookies in the DB and then write them to the browser session using the plugin write function?
Will this expose cookies set by Bubble itself, or only cookies that I define using the plugin?
You should add the workflow actions on the page where you want to read/write your Cookies
Cookies are stored in the user’s browser and we de not use a database on the demo page. In the create cookie block we provide a ‘value’ from the text input. The actual data source may be different depending on your app. Some examples:
user input (for example, user chose a preferred language and you can store it in Cookies)
data generated by your app (access token etc)
database
etc
You normally shouldn’t store cookies in the database because you can consider cookies as a kind of database (stored in the user’s browser)
Cookies are associated with a domain and could be generated by your application (using this plugin), Bubble engine itself, or other plugins you use
Don’t hesitate to contact me if you have any further questions!
Not sure if this is a dumb question, but could you use the Cookies plugin to store small amount of data, e.g. submitted via a form, in the browser when users are offline - and then access the cookie to save data into a Bubble database when connectivity resumes?
Actually yes, it could be! If you have a long form users need to fill in, you can store it to cookies first and then when user click on the “Submit” button, save the data from Cookies to Database.
But probably you could avoid using cookies and just save form fields to the database once a field is updated. Of cause user needs to be online but he won’t loose all the form data.
Don’t hesitate to contact me if you have any further questions!
I am not sure how to setup an action that can detect when option is set to true via cookies. It’s a little confusing.
I want to be able to use this throughout my entire workflows somehow - so I can make all my darkmode conditions “when cookie is yes” show the color type of thing or is this not possible?
Thanks for this plugin! Is there a way to detect when the cookie is expired and then trigger a workflow action?
I thought when the cookie expires, it will be dropped and the read cookies value would be empty, so I to set when read cookies value is empty → trigger an error message -->. However, this wouldn’t work, it seems the Cookie A’s value is always empty in this workflow even through I can see the cookie in my browser.
Expired cookies are removed by browser, so you can read cookies’s value and if it’s empty, it means that the cookie doesn’t exist.
Hum… if you are sure that the cookie exists but you can’t read it with the plugin that becomes weird… Could you please create a simple demo page to reproduce the issue?
Very interested in your Plugin, just want to check something. I run a couple of subdomains, one on bubble and one on Webflow. I am wanting to set a cookie on bubble subdomain and read it on web flow subdomain.
Will your plugin set the cookie at domain level so it can be read on any subdomain?
Greetings . I’ve been using this plugin for a while now and so far no problems. Today, however, it seems that it has started to stop working, these are all the errors I see.
For me it represents a big problem since I basically base everything on the saved cookie.
Could you solve it?
I am attaching some screenshots of the error.
I also confirm that by disabling the “Read Cookie” workflow, I no longer get errors.
@BubbleSam
Does your plugin allow a list of things to be stored to cookies or just individual data points?
My use case is a (non-signed in) user storing favourites of a list that can be displayed elsewhere in the app.
Thanks. Are there any details available on how this can be achieved; even if it’s just pointing to a different forum post somewhere?
It’s mainly around how you store a list as a single value and then retrieve this back as a list.