Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Using Geo location for Launch custom code

Avatar

Level 3

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?

 

1 Reply

Avatar

Level 5

@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