Yes.. I just checked it.. and even our use case required to have whatsapp to be added so I will take some time over the weekend and share the diff at the earliest.
And later in function front_footer, you are checking for cookie to be “1”, but it would be better off if you checked (array_sum(explode('|', $cookie_value)) === 0) and before that set $cookie_value = "0|0|0|0".