Measuring the blood gases of patients in the intensive care unit or undergoing major surgical procedures in real time would help healthcare providers diagnose and manage base excess and base deficient disorders. Optical fibers provide a platform upon which an intravascular blood gas sensor may be built and has been by various companies. Unfortunately, thrombosis on the sensor surface interferes with the blood gas measurements and also poses the risk of creating emboli. Nitric oxide inhibits platelet adhesion and activation, which can reduce thrombus formation on the sensor surface. An optically based pH sensor is fabricated as a first step to show that nitric oxide can be used with blood gas sensors to reduce thrombosis and not interfere with the measurements. pH sensors fabricated using glass microscope slides suffered from leaching of the dye from the sol-gel matrix. The dye readily leached out when the dye was in its appropriate protonated or deprotonated form. To reduce the leaching of the dye, methods of covalently linking the dye to fumed silica have been investigated, and one is presented here.