You actually need to avoid cookies getting stored until users give their consent to do so. Probably something like the rack-policy Ruby gem linked below will help making sure there is no cookies at all.
https://github.com/peter-murach/rack-policy#rack-policy
I ignore if there are similar libraries for other platforms.