Learn business growth with Google Analytics 4 Forums Google Analytics 4 Effective methods for including session_id when sending events to GA4 through Measurement protocol Reply To: Effective methods for including session_id when sending events to GA4 through Measurement protocol

  • Skyler

    Member
    12 March 2023 at 9:25 pm

    Hey, no sweat. We’ve got the fix you need. You just need to put the “session_id” inside the “params” array in the event.

    Like in this example. It shows you just how your measurement protocol event data should look:

    {
     "timestamp_micros": "1664522406546590",
     "non_personalized_ads": false,
     "events": [
      {
       "name": "purchase_balance_top_up",
       "params": {
        "user_id": "11111111",
        "crm_id": "11111111",
        "balance": 990,
        "payment_method": "paymore",
        "session_id": "1664522264"
       }
      }
     ],
     "client_id": "1119492379.1652295143",
     "user_id": "11111111"
    }
    

    There you go, problem solved. Keep slinging those APIs!