Hi there. So a few months ago our RudderStack-GA4 ...
# support
b
Hi there. So a few months ago our RudderStack-GA4 setup has not been showing the geo location in Google Analytics dashboards. In RudderStack we don't have any transformation and the same
JS source
is being used for multiples destinations such as Amplitude, Mixpanel, BigQuery and GA4. If the IP Address is used to calculate the geo location, I can confirm that that value is available in the payload for all destinations except GA4. GA4 destination - sample playload:
Copy code
{
  "body": {
    "XML": {},
    "FORM": {},
    "JSON": {
      "events": [
        {
          "name": "governance_viewProposal_clicked",
          "params": {
            "page_title": "Aragon App",
            "session_id": 1701938866058,
            "dao_address": "0x9c25a6b1bf3f6fd2f68a62169c043045c2460482",
            "proposal_id": "0x899d49f22e105c2be505fc6c19c36aba285d437c_0x1d",
            "page_location": "https://app.aragon.org/",
            "page_referrer": "$direct",
            "engagement_time_msec": 1
          }
        }
      ],
      "client_id": "17f7bb66-26e2-469c-919b-cb35787b64c0",
      "user_properties": {
        "network": {
          "value": "polygon"
        }
      },
      "timestamp_micros": 1701939407000000
    },
    "JSON_ARRAY": {}
  },
  "type": "REST",
  "files": {},
  "method": "POST",
  "params": {
    "api_secret": "xxxxxxxxxxxxxxxxxxxxx",
    "measurement_id": "G-BQY6YGQZLY"
  },
  "userId": "",
  "headers": {
    "HOST": "www.google-analytics.com",
    "Content-Type": "application/json"
  },
  "version": "1",
  "endpoint": "https://www.google-analytics.com/mp/collect"
}
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
b
..and this is a JS source sample payload:
Copy code
{
  "anonymousId": "325454a1-833e-4941-b372-f4c0f5d3c024",
  "channel": "web",
  "context": {
    "app": {
      "build": "1.0.0",
      "name": "RudderLabs JavaScript SDK",
      "namespace": "com.rudderlabs.javascript",
      "version": "2.20.0"
    },
    "campaign": {
      "source": "Trust_iOS_Browser"
    },
    "library": {
      "name": "RudderLabs JavaScript SDK",
      "version": "2.20.0"
    },
    "locale": "en-US",
    "os": {
      "name": "",
      "version": ""
    },
    "page": {
      "initial_referrer": "$direct",
      "initial_referring_domain": "",
      "path": "/daos/ethereum/changpengzhao.dao.eth/finance",
      "referrer": "$direct",
      "referring_domain": "",
      "search": "?utm_source=Trust_iOS_Browser",
      "tab_url": "https://app.aragon.org/?utm_source=Trust_iOS_Browser#/daos/ethereum/changpengzhao.dao.eth/finance",
      "title": "Aragon App",
      "url": "https://app.aragon.org/?utm_source=Trust_iOS_Browser"
    },
    "screen": {
      "density": 3,
      "height": 852,
      "innerHeight": 671,
      "innerWidth": 393,
      "width": 393
    },
    "sessionId": 1701939585683,
    "traits": {
      "network": "ethereum",
      "wallet_address": "0x9624E4CFD6AF51c2AA15d4f65b8874Ff8007cE5B",
      "wallet_provider": "eip-1193:"
    },
    "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
  },
  "integrations": {
    "All": true
  },
  "messageId": "1701939669506000-a6cbceec-d8ff-43ee-bf41-b1fde82a414e",
  "originalTimestamp": "2023-12-07T09:01:09.506Z",
  "properties": {
    "initial_referrer": "$direct",
    "initial_referring_domain": "",
    "path": "/daos/ethereum/changpengzhao.dao.eth/finance",
    "referrer": "$direct",
    "referring_domain": "",
    "search": "?utm_source=Trust_iOS_Browser",
    "tab_url": "https://app.aragon.org/?utm_source=Trust_iOS_Browser#/daos/ethereum/changpengzhao.dao.eth/finance",
    "title": "Aragon App",
    "url": "https://app.aragon.org/?utm_source=Trust_iOS_Browser"
  },
  "rudderId": "0e09fc47-378a-4b3a-8a8b-3e694f0614bb",
  "sentAt": "2023-12-07T09:01:09.507Z",
  "type": "page",
  "userId": ""
}
Appreciate your support. Regards.
m
Hi Roger, can you share the workspaceId as well?
b
Hi @shy-kite-21035 This is my WorkspaceID:
1w1wbZHgsOE2EKgy0MPSEs1EwvO
Appreciate your support.
m
Hi Roger, are you using a self-hosted data-plane to send your data.? (since I do not see any data in the dashboard) Can you provide the sourceId and destinationIds as well.
If you are using a self-hosted data-plane, can you provide the transformer and server version you are using?
b
right, I'm using self-hosted RudderStack data-plane and these are my versions:
Copy code
{
  "BuildDate": "2023-11-09,13:59:47",
  "BuiltBy": "0c72c09a53f3c228ae3e792d694186b3f7715027",
  "Commit": "0c72c09a53f3c228ae3e792d694186b3f7715027",
  "Features": [
    "gzip-req-payload"
  ],
  "GitUrl": "",
  "Major": "",
  "Minor": "",
  "Patch": "",
  "TransformerVersion": "1.41.1",
  "Version": "1.16.3"
}
The sourceID is
2068cNsYMnGyc7NFyQGCEzmp0xS
and destinationID is
2LpLnKnMQ4fBPDdScZbExZSDqwL
. Thanks again.
m
Can you try moving to the latest server and transformer version?
b
yes, sure
m
I will test this at my end as well and update here.
b
I'm using this config:
Copy code
image:
  server:
    name: rudderlabs/rudder-server
    tag: 1-alpine
    containerPort: 8080
  transformer:
    name: rudderlabs/rudder-transformer
    tag: latest
    containerPort: 9090
However, when redeploying both docker images, transformer got
1.41.1
always (3 months ago). The Rudder-Server image has been updated.
I've noticed in the application side, in the browser console I'm having this error:
Copy code
[handleError]:: "[Analytics] 'integration.init()' failed :: GA4_RS :: this.analytics.getSessionId is not a function" index.js:4648:36
    error index.js:4648
    U5 index.js:10503
    S6 index.js:14001
I have
"rudder-sdk-js": "^2.20.0"
in my
package.json
m
Oh ok. Let me check with the team on this and get back to you.
👍 1
h
@brainy-iron-749, this error should disappear once you update the JS SDK to the latest version. Also, please start using our latest V3 SDK, which is a lot more performant than its predecessor, https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/v3/
b
Thanks @helpful-daybreak-79835 and @shy-kite-21035 I'll apply the changes. I appreciate your support.