Heterostructures exhibiting perpendicular magnetic anisotropy (PMA) have traditionally served the magnetic recording industry. However, an opportunity exists to expand the applications of PMA heterostructures into the realm of hydrogen sensing using ferromagnetic resonance (FMR) by exploiting the hydrogen-induced modifications to PMA that occur at the interface between Pd and a ferromagnet. Here, we present the first in operando depth-resolved study of the in-plane interfacial magnetization of a Co/Pd film which features tailorable PMA in the presence of hydrogen gas. We combine polarized neutron reflectometry with in situ FMR to explore how the absorption of hydrogen at the Co/Pd interface affects the heterostructures spin-resonance condition during hydrogen cycling. Experimental data and modeling reveal that the Pd layer expands when exposed to hydrogen gas, while the in-plane magnetic moment of the Co/Pd film increases as the interfacial PMA is reduced to affect the FMR frequency. This work highlights a potential route for magnetic hydrogen gas sensing.