The scattering of primary beam electrons has several implications for energy dispersive X-ray analysis on the environmental scanning electron microscope (ESEM). One of the most basic problems is determining the spatial distribution and fraction of primary beam electrons scattered under typical high pressure analysis conditions A method for studying the scattering of the primary electron beam in the ESEM has been demonstrated. The method involves the use of self-assembled alkanethiol monolayers (SAM) which are sensitive to damage by primary beam electrons. After irradiation, the electron damaged molecules can be exchanged out of the monolayer by immersion in a second alkanethiol solution. The spatial distribution of this second marker compound can then be imaged directly by static secondary ion mass spectrometry (SSIMS). Alternatively, only a single fluorinated thiol is used and the decrease in fluorine secondary ion signal is used to map the electron damage.