Learn business growth with Google Analytics 4 Forums Google Analytics 4 Unlinked GA4 Dimensions: Language for Measurement Protocol Events Showing as (Not Set)

  • Unlinked GA4 Dimensions: Language for Measurement Protocol Events Showing as (Not Set)

    Posted by Isabella on 1 August 2022 at 8:28 am

    Hey there! I’m working with Google’s GA4 measurement protocol, logging offline conversions to Google Analytics. I’m focusing on two conversion events – “sale” and “purchase”. They’re being captured alright, and the revenue is visible in the Monetisation overview.

    Here’s the hitch: it appears GA isn’t tying these events to other user dimensions. Say I want to break down the data by any user dimension, like their language or OS. Instead of the usual info, I’m seeing something like this:

    Language Code for the sale and purchase events is "(not set)"

    You’ll notice all the language codes for the sale and purchase events are “(not set)”.

    But check this out – in the user explorer the sale and purchase events are correctly tied to the client_ids:

    In the user explorer, sale and purchase events are associated with the correct client_ids.

    So I’ve got to know – how can I get GA4 to tag along events from the measurement protocol with events recorded on the website, for the same client_id?

    Curious to see what this looks like in practice? Take a look at this payload from a sale event:

    { 
      "client_id": "1799600509.1659478566", 
      "timestamp_micros": "1659855760249000",
      "events": [
        { "name": "sale", "params": { "first_billing": 1 } }
      ] 
    }
    

    And here’s one from a purchase event:

    { 
      "client_id": "1799600509.1659478566", 
      "timestamp_micros": "1659855760249000",
      "non_personalized_ads":false,
      "events": [
        { 
          "name": "purchase", 
          "params": { 
            "items": [],
            "currency": "USD",
            "value": 1.2
          } 
        }
      ] 
    }
    
    Liam replied 10 months, 4 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • James

    Member
    5 October 2022 at 6:56 pm

    Sure, let me simplify this for you. The Google Analytics 4 (GA4) measurement protocol is a bit stricter compared to its predecessor. Certain things like a user’s language code can’t be set through this protocol. That’s why it’s showing up as “not set”.

    Right now, there isn’t a workaround to this within the confines of the measurement protocol. To get these kinds of data, you’d have to use the provided SDKs, not the direct measurement protocol.

    Oh, and there’s this survey from Google where you can give them feedback about their measurement protocol. It could be a way to request them to loosen the restrictions a bit.

  • Liam

    Member
    21 November 2022 at 12:16 pm

    It appears that GA4 isn’t correctly associating your events to user dimensions because the client session_id and session_number parameters are missing in your events data. Despite not being mentioned in the GA4 MP documentation, including these parameters in the params object of each event, along with the client_id, should correctly tie client data to your events. There’s a bug report related to this issue which provides a relevant example, you can find it at https://issuetracker.google.com/issues/243678686. Even though it was rejected by the Google team, the information should help in solving your issue.

Log in to reply.