MOVACT / voteswiper-web

VoteSwiper helps citizens to find a political party that matches their own views in a playful way.
https://www.voteswiper.org
Other
20 stars 2 forks source link

Save the result in the cookies #29

Open 2fersen opened 1 year ago

2fersen commented 1 year ago

Hey I just finished the wahlswiper, tabt out of the webpage on the smartphone and the result is gone, would be really cool if this gets saved in the cookies.

martin54 commented 6 months ago

+1 Happened to me also, when I clicked on the "other donations" link on the results page :-(

PS: From a privacy p.o.v., storing the choices is maybe not the best idea, e.g. if the computer is used by multiple persons (risk could be reduced if cookie timeout is short, and only stored as long as browser is open). Probably also a cookie banner is then required.

Therefore probably a better approach would be to avoid somehow that the answers will be lost, as long as the page stays open.

SlowMoschen commented 5 months ago

Maybe store the result in the SessionStorage? - I mean this will work until the user opens a new tab of the website or closes it.

And if the user want to go back to the result page via the back button or browser history, we could check if the an item is in storage and use this data to display the results.


Another method would be to give an option to send the results as an email to a given user-mail. This is probably a bit more complicated to implement.

mxmtsk commented 5 months ago

Another Idea is also to have the answers in the query string, that way it wouldn't be stored - we just would need to make sure that the query string is stripped from the url when the pageView is tracked in our Matomo instance. That way someone visiting VoteSwiper from the same computer in the same sessions, he wouldn't see an old result.

SlowMoschen commented 5 months ago

I like the idea with saving the result in the query string. I will have a look on how we could implement the feature in the next days.

As soon as I got a suggested solution, I write a comment here.