Pomeshan
Pomeshan

Reputation: 11

Events transmitted through the Measurement Protocol with the user_id are not received in GA4

On February 23, 2024, problems with events began.

My issue is that the purchase and login events are not appearing in** GA4**, even though the tag fires in GTM for these events.

I've identified the reason why it's not firing. When I send a request without param the user_id, the purchase event goes through to GA4. However, as soon as I include the param user_id in the request, the event stops coming through.

I'm transmitting events through the Measurement Protocol. Interestingly, there's another event, add_to_cart, also sent through MP without initially having a user_id in param, and it doesn't encounter any issues, successfully reaching GA4.

There were no changes made to GTM or the POST request during the period when the problems started. In other words, without any changes on my end, the events stopped working.

My suspicion is directed towards Google Consent Mode V2, but I haven't found confirmation for this yet.

POST request (It worked until 02/22/2024 and is working now)

{
    "client_id": "FPID2.2.deleted in example",
    "events": [{
                "name": "purchase",
                "params": {
                    "v": 2,
                    "en": "purchase",
                    "tid": "deleted in example",
                    "client_id": null,
                    "client_id_2": null,
                    "currency": "USD",
                    "d_time": "08:08:38.000Z",
                    "date": "2024-03-22",
                    "email": null,
                    "engagement_time_msec": null,
                    "environment": "production",
                    "event_n": "purchase",
                    "event_name": "purchase",
                    "f_engagement_time_msec": 0,
                    "f_session_id": 1710129998,
                    "f_session_number": 1,
                    "ga_session_id": null,
                    "gclid": null,
                    "items": [
                        {
                        "item_brand": "deleted in example",
                        "item_category": "Subscribe",
                        "item_category2": "First transaction",
                        "item_id": "Single Use once",
                        "item_name": "Single Use once",
                        "price": 29,
                        "quantity": 1
                        }
                        ],
                    "page_location": "https://deleted in example",
                    "page_title": "deleted in example",
                    "session_id": null,
                    "timestamp": 1710129998309,
                    "timestamp_micros": 1710140797957000,
                    "traffic_source": null,
                    "transaction_id": "93213cfdg1",
                    "user_id": "0020b27c-160a-450b-8806-b4287b88162a",
                    "value": 29
                }
            }
        ]
}

I've looked into debug mode, and I see events with user_id and without. Interestingly, in the event I sent without the user_id parameter in the GA4 debug mode, I still saw the user_id. I suspect GA4 may have linked it via the client_id.

Upvotes: 1

Views: 298

Answers (0)

Related Questions