Server-Side integration and Client hints

I am new to Pirsch and integrating analytics with the server-side implementation.

There I see that Client Hints are used/needed to get more than the bare minimum of information. From reading into the IETF spec and, I see that only Chromium-based browsers support them right now.

Can I use the JS scripts like pirsch-extended.js to fill in the missing information, and to get a complete picture? Is this something I can do/you recommend, or is this simply a consequence of using server-side?

If I can mix both, would I configure the pirsch-extended.js in a specific way, like excluding data-disable-page-views?

Thank you very much.

Hi Mike,

Thank you for signing up and welcome to the forum :slight_smile:

I wouldn’t recommend mixing the two, unless for events maybe. The client hints are automatically sent by the browser (if supported), so you can simply forward them, just like the User-Agent. They are not strictly required, we gather the same information from the User-Agent, but it can be a bit more reliable and accurate, as we don’t have to parse them.

So, as long as you forward them, you won’t miss out on anything. Just make sure you respond with the right headers from your server:

Hello Marvin,

Thank you very much for the clarification and insight. That definitely helps me to understand the subject better.

One observation after switching to server-side is, that I do not see screen sizes anymore. I find them quite valuable, and would like to understand how you get them (back)? I thought the screen dimensions come through JS only? Is this correct? Providing them by Client Hints will eventually work, but checking I see that there is zero support in Firefox and Safari for them yet. So this is a mixed bag.

Thank you very much for taking the time to help me understand the pros and cons of JS vs. server-side, especially as you recommend server-side.

Correct, for the screen size we rely on JavaScript. Relying on Client Hints isn’t feasible right now.

Unfortunately, this means you would need to provide the screen_width and screen_height yourself.