Expand my Community achievements bar.

SOLVED

Web SDK not collecting placeContext.geo fields in sendEvent call

Avatar

Level 1

Need some help getting several missing context fields to be included in the Web SDK's `sendEvent` payload, or at least to understand why these aren't being collected.

 

Background:

  • I am setting up the tagging rules for a Web SDK implementation for a client's new website that is currently in development.
  • For the moment I'm using Luma as a test environment to inject my embed code via Platform Debugger, since the new website does not have any lower environments set up yet.

The problem:

  • None of the fields under `placeContext.geo` that are supposed to be auto-collected are being included in the `sendEvent` payload:
    • `countryCode`
    • `stateProvince`
    • `_schema.latitude`
    • `_schema.longitude`
  • Screenshot 2025-01-31 at 11.45.12 AM.png

The documentation doesn't mention any limitations or caveats for which of these fields will be auto-collected. The only stated requirement is that the appropriate categories are checked off in the extension configuration, which I've confirmed they are:

Screenshot 2025-01-31 at 12.37.15 PM.png

I'm curious if the `geo` fields only apply to web browsers on mobile devices...? I'm not currently able to test this theory since I'm limited to using Debugger on desktop to inject our code, at least until our lower environments are available and injection is no longer necessary.

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @PeterNo7 ,

To get all these fields you need to follow below steps,

Once these configurations are completed all your selected fields should be available in data collection as expected.

Please note that if you inspect the client side network calls you'll still see only placeContext.localTime and placeContext.localTimezoneOffset fields in the XDM payload, rest of the fields are added to XDM on edge and are can be viewed in an assurance session or in the final data collected.

Cheers!

View solution in original post

2 Replies

Avatar

Correct answer by
Level 9

Hi @PeterNo7 ,

To get all these fields you need to follow below steps,

Once these configurations are completed all your selected fields should be available in data collection as expected.

Please note that if you inspect the client side network calls you'll still see only placeContext.localTime and placeContext.localTimezoneOffset fields in the XDM payload, rest of the fields are added to XDM on edge and are can be viewed in an assurance session or in the final data collected.

Cheers!

Avatar

Level 1

Exactly what I was looking for -- thank you so much @Harveer_SinghGi1! That was indeed the missing piece; can confirm the issue is resolved.

 

Appreciate the doc links as well, they were super helpful references so I'll keep em bookmarked for future.

 

Cheers,
Peter