Custom parameters on GA4 request

Hello everybody, I would like to save the “X-Device-Bot” and “X-Device-Bot-Score” values within all the GA4 events using custom parameters.

I’ve added the parameters using the Stape GA4 Server Side Tag, and then “Parameters to Add / Edit” section

The HTTP request looks like this:

https://www.google-analytics.com/g/collect?v=2&.....**&device_bot=false&device_bot_score=6**

The issue is that the parameters added through server side are not visible in the debug view mode in GA4. I’ve learned that those parameters should exist in the HTTP request with an “ep.” prefix (eg. &ep.device_bot=false), but in my case they don’t.

How can I fix this? Could this be a bug in the Stape tag?

Have you added these parameters to the custom definition in GA4?

Is there any reason for you to use the GA4 Advanced tag rather than the standard tag? Unless you have some specific tasks - it is usually better to use the standard GA4 tag.

Hello Alex,
I’ve found a workaround for this: custom parameter names should be written with the “ep.” prefix
So, parameter should be named as “ep.device_bot”
The POST request now looks like this:

https://www.google-analytics.com/g/collect?v=2&.....&ep.device_bot=false&ep.device_bot_score=12

And now I can see the custom parameters in DebugView section

1 Like