Using Geo location for Launch custom code | Community
Skip to main content
Level 4
October 16, 2025
Solved

Using Geo location for Launch custom code

  • October 16, 2025
  • 2 replies
  • 205 views

We have Web SDK set up. In our Data Stream, under GEOLOCATION AND NETWORK LOOKUP, all the checkboxes including State/Province, and Country are clicked. In the Adobe Debugger, I found this variable  xdm.placeContext.geo.stateProvince. It's set to my Country and Province.

I would like to use the value of stateProvince in a Custom Code in Launch; e.g. If xdm.placeContext.geo.stateProvince = "CA-ON", then do some action.

How can I refer to the stateProvince variable to use it in a custom code in Launch?

 

Best answer by Devyendar

@m_alcantara xdm.placecontext.geo.stateprovince is not directly accessible in Launch as web sdk doesn’t expose it globally.

 

You can try using onBeforeEventSend as it could provide access to full XDM payload, including automatically added context like placeContext.geo.stateProvince

2 replies

Devyendar
DevyendarAccepted solution
Level 6
October 22, 2025

@m_alcantara xdm.placecontext.geo.stateprovince is not directly accessible in Launch as web sdk doesn’t expose it globally.

 

You can try using onBeforeEventSend as it could provide access to full XDM payload, including automatically added context like placeContext.geo.stateProvince

Devyendar
Level 6
October 29, 2025

@m_alcantara Hope you were able to resolve and get a resolution for the issue, if so, please mark the response as "Correct Answer" and like the post so that others in the community can find the working solutions easily.