Search code examples
google-analytics-4measurement-protocol

How do you send equivalent to gtag(config) in measurement protocol?


I'm trying to migrate to GA4, but I need to use measurement protocol. I am successfully sending events to GA with POST requests based on this documentation: https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events

Unfortunatelly I can't figure a way to send a config request which is described in https://developers.google.com/tag-platform/gtagjs/configure

gtag('config', 'TAG_ID', {<additional_config_params>});

Can anyone show me a working example?


Solution

  • With Measurement Protocol, you don't need to set the config. If you are able to send the events using Offical docs, then you are all set.

    The gtag('config', 'TAG_ID', {<additional_config_params>}); config is used when you use gtag js on the client side. This is not related to Measurement Protocol at all.