Better Grouping of Analytics requests from same Page View in large sites
Grouping requests from the same page view under the same ID is a common use case ([1],[2]), and is supported by PAGE_VIEW_ID.
Problem is that PAGE_VIEW_ID only has a small range 0-9999 - this is nowhere near enough.
Large e-commerce sites with tens of millions of page views per day typically use UUIDs of 128 bits.
A slight workaround would be a concatenation of CLIENT_ID and PAGE_VIEW_ID to reduce collisions, but that is still not nearly sufficient.
Possible Suggestions:
Greatly extend the range of PAGE_VIEW_ID to accommodate use cases for large sites with a ton of page views? Introduce a new UUID?
you can use :NAV_TIMING
We went into this issue a couple of times. I think the current PAGE_VIEW_ID is a bit confusing and quite useless given its low entropy.
I want to see if there was any specific reason in the first place why we design this ID. If not, I suggest we introduce one with higher entropy.
A couple of options:
- We update this value directly to a base64 with 128bit entropy, by taking the risk of breaking existing users (if the user think it's always a number or a length of < 6).
- We introduce a new value and deprecate the old one. Tentative naming:
- PAGEVIEW_ID
- PAGE_VIEW_HID
- We extend the current var to a function that takes a param: PAGE_VIEW_ID(128)
I'm leaning towards the 2nd option.
Design review meeting notes
- Low entropy PAGE_VIEW_ID was to avoid any privacy implication. But we think it's fine to introduce a high entropy one now.
- will only support 64bit value encoded in URL safe Base64
- naming: PAGE_VIEW_ID_64 or PAGE_VIEW_ID(64)
Tracked as a GFI here: #13282