In Drupal 9 we have a _preprocess_node() hook that loads a users cookies like:
if (isset($_COOKIE['utm_source'])){ $parameters[] = 'utm_source=' . $_COOKIE['utm_source']; }
But it will load the cached cookies, even from other visitors until the cache is cleared.
We’re trying to load the cookie parameters into a node template but it appears that preprocess hooks are caching the data. Even with all caching modules turned off.
So, is there another way we should be checking and passing cookie data to a node template?