is the so called lipophilic entrapment according to which the dye core is provided with one or more lipophilic linkers the lipophilic linkers will engage with the lipophilic environment of the network formed by the sol gel components and thereby retard the leakage in a preferred method the dye core provided with one or more lipophilic linkers is added either to one or both of the sol gel components or to the mixture of the first and the second sol gel component to ensure a sufficient maturation of the mixture it may be kept for 1 hour to 7 days before it is deposited on the substrate and cured a covalent attachment of the dye is possible by linking the dye to one of the monomers before polymerisation in a preferred method an additional alkoxysilane is prepared as a derivative of the first alkoxysilane by attaching the dye thereto the additional alkoxysilane may be incorporated into either the first sol gel component or the second sol gel component in a preferred aspect the first or second alkoxysilane is allowed to polymerise a short time such as at least 15 minutes before the further alkoxysilane is added to avoid end positioning the mixture of the first sol gel component and the second sol gel component may be allowed to mature before the deposition on a suitable substrate the substrate is generally transparent at the wavelength used for monitoring the emitted light the amount of the mixture used for deposition varies in dependence of the purpose and geometry of the sensor in a certain aspect the amount is 100 u03bcl or less such as 50 u03bcl or less suitably.