alert-vegetable-59655
01/13/2024, 4:06 AMmillions-activity-52391
01/13/2024, 4:06 AMalert-vegetable-59655
01/14/2024, 4:23 AMalert-vegetable-59655
01/15/2024, 9:31 PMmillions-activity-52391
01/16/2024, 2:22 PMshy-kite-21035
01/16/2024, 2:27 PMrudderanalytics.track(
"Promotion Viewed", {
creative: "Summer Banner",
position: "featured_app_1",
promotion_id: "P_12345",
name: "Summer Sale",
products: [{
product_id: "507f1f77bcf86cd799439011",
name: "Monopoly: 3rd Edition",
coupon: "SUMMER_FUN",
category: "Apparel",
brand: "Google",
variant: "green",
price: "19",
quantity: "2",
position: "0",
affiliation: "Google Merchandise Store",
currency: "USD",
discount: 2.22,
}, ],
}, {
externalId: [{
type: "ga4ClientId",
id: "client_id",
}, ],
}
);
Notice: How the clientId is sent as an external id.
You will also need to pass the sessionId to the event that you are sending from your backend.
Make sure the pass the clientId and sessionId to your NodeJs backend and then pass the fields to GA4. Also your sessionId would be in context.traits. See docsalert-vegetable-59655
01/17/2024, 4:28 AMalert-vegetable-59655
01/18/2024, 12:42 AMalert-vegetable-59655
01/18/2024, 1:18 AMmillions-activity-52391
01/18/2024, 10:17 AMshy-kite-21035
01/18/2024, 10:17 AMclient.track({
userId: "123456",
event: "sometjing_done",
properties: {
abc: {},
revenue: 19.95,
shippingMethod: "Premium",
},
context: {
externalId: [{
type: "ga4ClientId",
id: "f0dd99b6f979fb551ce583373900f937"
}],
}
})alert-vegetable-59655
01/24/2024, 7:15 AMmillions-activity-52391
01/24/2024, 2:42 PM