Learn business growth with Google Analytics 4 Forums Google Analytics 4 Trouble receiving events on GA4 dashboard after transitioning from UA

  • Trouble receiving events on GA4 dashboard after transitioning from UA

    Posted by Amelia on 7 April 2023 at 6:14 am

    “Why isn’t my data showing up in my new GA4 dashboard when I change the tracking ID in my Python script from UA to GA4, even though it used to work with the UA tracking?”

    Sofia replied 11 months, 2 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Charlotte

    26 June 2023 at 6:37 am

    The issue you’re experiencing seems to be stemming from the fact that you’re using the Measurement Protocol (Universal Analytics) to send hits to a Universal Analytics (UA) account. This is only designed to work with UA.

    When you want to send hits to a GA4 (Google Analytics 4) account, a different system called Measurement Protocol (Google Analytics 4) is used, and it also has a different endpoint.

    Here’s how you set up an endpoint for a GA4:

    POST /mp/collect HTTP/1.1
    HOST: http://www.google-analytics.com
    Content-Type: application/json


    Another important thing to remember is that GA4 is quite different from UA. When switching to GA5, you’ll have to modify the format of your hits and convert them into events. Here’s an example of how an event payload looks like:

    “client_id”: “x”,
    “events”: [
    “name”: “offline_purchase”,
    “params”: {
    “engagement_time_msec”: “100”,
    “session_id”: “123”

    While transitioning, keep in mind that the measurement protocol for GA4 is somewhat limited. You might not be able to send all the hits you want, as many of them are restricted for use by Google’s internal SDKs. If you want a clear picture of what you can send, take a look at the event-builder on the Google Analytics Developer Tools site.

  • Sofia

    8 July 2023 at 10:12 am

    Changing your tracking ID from UA (Google Analytics) to GA4 (Google Analytics 4) in your Python script will not automatically make your data appear in your new GA4 dashboard. This is because GA4 uses a completely different measurement model compared to the previous versions of Google Analytics. GA4 is event-based and does not use the same tracking codes as before, so the data cannot be transferred just by changing the tracking ID. You will have to update your Python script to use the new GA4 Measurement Protocol, which might require some changes to the way you capture and send the data. It’s also worth noting that GA4’s Measurement Protocol is currently in beta, so some features might not work as expected. You could also experience some delays in the data appearing in your GA4 dashboard. Therefore, it’s recommended to run your UA and GA4 properties in parallel during the transition phase.

Log in to reply.