Learn business growth with Google Analytics 4 Forums Google Analytics 4 Adding `host_name` using Measurement Protocol for GA4: Is it feasible? Reply To: Adding `host_name` using Measurement Protocol for GA4: Is it feasible?

  • Samuel

    Member
    5 July 2023 at 9:07 am

    GA4’s Measurement Protocol is significantly different from Universal Analytics. The familiar ‘dh’ parameter (document hostname) from Universal Analytics, doesn’t exist in GA4. Therefore, the idea of passing ‘host_name’ in the same manner does not work in GA4. The GA4 protocol uses an event-based model, therefore, most of the parameters you passed in Universal Analytics need to be sent as part of an event’s parameters for GA4. However, as of right now, there is no direct equivalent to passing ‘host_name’ in GA4. A possible solution could be to define a custom parameter for ‘host_name’ as part of your events if you feel this data is crucial. Please make sure to check GA4’s documentation for the latest updates and changes.