I'm facing a problem with custom events sent to Google Analytics. The main problem is that custom sent events are being assigned only to user acquisition and not to traffic acquisition.
I'm sending 2 custom events.
1st event starts the session:
{ "client_id": "435384.2118427612", "events": [ { "name": "session_start_test", "params": { "session_id": 1733217977, "source": "Test source", "medium": "cpc", "session_number": 1 }, "timestamp_micros": 1733217976999990 } ] }
2nd event send source data:
{ "client_id": "435384.2118427612", "events": [ { "name": "custom_event_test", "params": { "session_id": 1733217977, "engagement_time_msec": 100, "title": "Test title", "country": "Estonia", "source": "Test source", "medium": "cpc", "campaign": "test", "campaign_source": "Test source", "campaign_medium": "cpc", "session_number": 2 }, "timestamp_micros": 1733217977000000 } ], "user_properties": { "country": { "value": "Estonia" } } }
Both events are sent to GA and can be seen inside realtime reporting.
The problem that both of these events still assign source/medium to user acquisition instead of traffic acquisition. I've also tried to send utm_source and utm_medium, but that did not work out. Any ideas where is the problem?
I'm sending both events with PHP curl, using Google Measurement Protocol API.