Hi I want to ask about, we are using JDK to GA4 ,i...
# support
l
Hi I want to ask about, we are using JDK to GA4 ,is it field in the traits will be sent to user property , or not ?
s
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.
q
Hi @lively-airline-84487 Are you facing any issues? You should be able to send the field in traits to GA4. You can find some explanations about traits in identify section of this page & this page The
identify
call lets you identify a user and associate them to their actions. It also lets you record any traits about them like their name, email, etc.
l
yes, we meet problems. we added fields in traits, but it was not in the user property in ga4.
is there any way to pass the user properties to GA4 ? @quiet-wolf-72320
q
@lively-airline-84487 • Can you share the payload that you are sending and what properties are missing in GA4? • Can you share the destination ID too?
l
WE make the JS SDK to two destination one to Bigquery,one is GA4, we could see traits data in bigquery ,but none in GA4, we passed like CRM_id, anonymous_id .and we also need GEO or device fields. destination ID is 2Hwc9KchcbETFRnFX662zulreUL
[ { "eventName": "view_pdp", "eventType": "track", "payload": { "anonymousId": "49fc0e75-cc9c-4302-98b2-d8b16a4c2336", "channel": "web", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "2.20.0" }, "campaign": {}, "library": { "name": "RudderLabs JavaScript SDK", "version": "2.20.0" }, "locale": "zh-CN", "os": { "name": "", "version": "" }, "page": { "initial_referrer": "$direct", "initial_referring_domain": "", "path": "/pages/phone-1", "referrer": "https://nothing.tech/account", "referring_domain": "nothing.tech", "search": "", "tab_url": "https://nothing.tech/pages/phone-1", "title": "Nothing Phone (1) - Nothing (United Kingdom)", "url": "https://nothing.tech/pages/phone-1" }, "screen": { "density": 1, "height": 1080, "innerHeight": 969, "innerWidth": 1920, "width": 1920 }, "sessionId": 1673353146000, "traits": { "anonymousId": "49fc0e75-cc9c-4302-98b2-d8b16a4c2336", "crm_id": "5484944195723", "email": "aajessie@fstln.io", "firstName": "Jessie", "geolocation": { "acc": "50", "asn": "CHINA UNICOM China169 Backbone", "city": "", "code": "CN", "country": "China", "lat": "34.7725", "long": "113.7266", "pc": "", "region": "", "time_zone": "" }, "lastName": "Xu", "name": "Jessie Xu", "user_id": "5fbe13e6-1471-4e93-8987-084031823103" }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" }, "event": "view_pdp", "integrations": { "All": true }, "messageId": "1673353202693000-dcb3935c-018b-43ba-a515-ff80a6adf3ea", "originalTimestamp": "2023-01-10T122002.693Z", "properties": { "device": { "category": "desktop" }, "sessionId": 1673353146000, "user_properties": { "device": { "value": "desktop" } } }, "receivedAt": "2023-01-10T122003.592Z", "request_ip": "103.144.52.197", "rudderId": "a61b517b-7fea-49fc-884b-d2f2fac8df44", "sentAt": "2023-01-10T122002.712Z", "timestamp": "2023-01-10T122003.573Z", "type": "track", "userId": "5fbe13e6-1471-4e93-8987-084031823103", "user_properties": { "geolocation": { "acc": "50", "asn": "CHINA UNICOM China169 Backbone", "city": "", "code": "CN", "country": "China", "lat": "34.7725", "long": "113.7266", "pc": "", "region": "", "time_zone": "" } } } } ]
q
@lively-airline-84487 One difference I see in BigQuery and GA4 that is connected to the JS SDK source is that you are using a transformation for GA4 but not with BigQuery. While I check the transformation, can you remove the transformation and test it to make sure that the transformation is not causing this
@lively-airline-84487 How are you making
identify
call? The
identify
call lets you identify a user and associate them with their actions. It also lets you record any traits about them like their name, email, etc. You can check the sample on this page A sample
identify
call using
gtag
Copy code
rudderanalytics.identify("1hKOmRA4GRlm", {
    firstLogin: true,
    method: "Google",
    value: 10,
    currency: "USD"
});
A sample
identify
call using
firebase
Copy code
rudderanalytics.identify("1hKOmRA4GRlm", {
    firstLogin: true,
    method: "Google",
    value: 10,
    currency: "USD"
}, {
    externalId: [{
        type: "ga4AppInstanceId",
        id: "f0dd99b6f979fb551ce583373900f937"
    }],
});
@lively-airline-84487 can you help me with a few more details to identify the difference. 1. Go to JS source live events-> send an event and capture the event payload 2. Go to GA4 destination live events -> send an event and capture the payload 3. Repeat step 2 for the BiQuery destination too Can you share these 3 payloads to see the actual difference and identify the issue? FYI. GA4 works differently as compared to other destinations and you can check this implementation guide for some help https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/google-analytics-4-cloud-mode/ I observed that you have enabled debug mode in your GA4 config and in that case you won’t see the events in the GA4 dashboard.