Score:0

We need to check for and capture a URL parameter that may on any page so we need a efficient way to do this?

ng flag

We need to track some anonymous users coming to the site with a URL parameter, like "?utc=1234". This could be on any page though so I don't know what the most resource-efficient way to accomplish this is.

We are also using Cloudflare and Memcached so I don't know how this may affect anonymous users.

The use case is, upon a page load, to check if the URL parameter exists and, if it does, then save it to a cookie for later retrieval.

Kevin avatar
in flag
Sounds like a job for an event subscriber IMO.
4uk4 avatar
cn flag
Yes, but then you can't use page caches like the Internal Page Cache and Cloudfare. When the page is served from cache the event subscriber on the server doesn't run.
Score:0
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.