4 ms·
if (cookies.accepted) { trackUser(); } else { trackUserAnyway(); }
by kfkdjajgjic 1y ago
if (cookies.accepted) {
trackUser();
} else {
trackUserAnyway();
}
- esalman 1y agoelse { trackUserCovertly(); }
- benbristow 1y agoif (cookies.accepted) { trackUser(); } else { isAbTestEnabled() ? trackUserCovertly() : trackUserAnyway(); }
- elpakal 1y agosimplify if (true) { trackUser(); }
- crisnoble 1y agotrackUser();
- tobyjsullivan 1y agolgtm. Ship it
- elpakal 1y agotrackUser()
- thinkingemote 1y agoI recently looked at how websites handled these simple "accept cookies" buttons - turns out lots of them did them like your example but more like {trackUser(); } else {trackUser(); } The only effect was to close the popup. Even some (most?) off the shelf cookie consent libraries don't handle the turning the actual cookies off.