0

Im missing something with the UTM information using GA4's Measurement protocol.

With the old Universal Analytics, this data only needed to be set through the url (utm_source=sourceValue&utm_medium=mediumValue&utm_campaign=campaignValue), and will be stored in the user_id session automatically, so when i was using Mesurement protocol calls from my backend i only needed to give the user_id and the UTM parameters will populate automatically.

But with GA4 I don't find any way to do my backend calls with this UTM data also sending client_id and user_id parameters.

I found ways to set UTM parameters using gtag but it doesen't work the same way using Measurement protocol... I also tried doing the call using get parameters https://www.google-analytics.com/mp/collect?cn=campaignValue&cs=campaignSource&cm=campaignMedium&measurement_id=${measurement_id}&api_secret=${api_secret} and post parameters it works fine with the params (cs cn cm), but im unable to find the campaign information in GA4 dashboards.

Anyone struggling with this?

GBS
  • 124
  • 1
  • 3
  • 16
  • 1
    measurement protocol for ga4 is limited they are still working on it – Linda Lawton - DaImTo Jul 17 '23 at 14:42
  • Thanks A LOT for answering i was almost blind here... do you have any official source about this, do google have any plans for the near future? – GBS Jul 17 '23 at 17:49
  • I know they are still working on it but I haven't been told exactly what they are doing. I think we need to wait and see what happens in the next six months. I'm also under NDA so even if I did know more I couldn't say. ‍♀️ let me just send you question off to them though – Linda Lawton - DaImTo Jul 18 '23 at 08:08
  • 1
    You need to use the `campaign_details` event to send campaign data to GA4, which can then be linked to the user with `client_id` and/or `user_id`. https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#campaign_details – Simo Ahava Jul 18 '23 at 08:55
  • @SimoAhava Already fired an event `campaign_details`... But it don't appear in the debug view... But with a debug call `/debug/mp/` it doesn't show any validation messages... so i must put this event inside the `events` array or it must be executed before another MP call? Any example to send this as a `purchase` as an answer will be super helpful! – GBS Jul 18 '23 at 12:24
  • Also, @SimoAhava I've test this yesterday, in the same event and with different events, but GA4 the UTM information seems to not reach google analytics... Maybe I'm doing something wrong or Google doesn't support the event `campaign_details` as we expect? – GBS Jul 19 '23 at 07:22
  • @GBS the team is looking into it. campaign_details should be the correct approach. – Linda Lawton - DaImTo Jul 26 '23 at 16:28

0 Answers0