## 1 Introduction  
Nanomaterials have aroused a great interest in the research field due to their chemophysical properties that are not owned by the material itself but that appear for their reduced size. For instance, noble metal nanomaterials have attracted wide attention in past years due to their unique optical properties. Metals have free electrons in the conduction band that determine their high electrical conductivity and optical reflectivity. When the particle dimensions decrease, approaching tens of nanometers as in the case of nanoparticles (NPs), electron motion on the particles surface dominates. When an electromagnetic wave (visible light) interacts with NPs, the physical phenomena of Localized Surface Plasmon Resonance (LSPR) occur, i.e., a collective oscillation of conduction electrons upon interaction with the light. Colloidal suspensions of metal NPs display intense colors, thus, in the absorption spectra, characteristic bands appear that depend on the type of metal and on the dimension and shape [1, 2, 3, 4, 5]. When the NPs size decreases below 2 nm, the nanostructures are named nanoclusters (NCs), and present a different optical behavior. In this case, discrete energy levels instead of bands are present and the electronic transitions, induced by the interaction with electromagnetic wave, produce absorption and fluorescence. Consequently, NCs systems show not only characteristic bands in the absorbance spectra but also bright luminescence [6, 7, 8, 9, 10]. The number of atoms composing the metal nanoclusters and their shape play an important role in the absorption and emission spectra [11, 12, 13]. Metal nanoclusters can be synthesized by chemical reduction [14; 15; 16], starting from a precursor salt of the desired metal and using a reducing agent, which reduces the metal ions into metal atoms. Alternatively, especially in water synthesis, the reducing agent can be a physical one, such as strong UV radiation [17; 18] or ultrasonic waves [19; 20], which produce radicals from the H\({}_{2}\)O molecules, and these radicals are responsible for the reduction of metal ions into metal atoms. Colloidal suspensions of metal NCs can be exploited for different applications such as fluorescent labels for bioimaging [21; 22; 23], drug-delivery [24; 25; 26], catalytic applications [27; 28; 29] and environmental monitoring [30; 31; 32]. Analytical techniques with high selectivity and sensitivity are commonly employed to detect water pollutants, such as atomic absorption spectroscopy (AAS) [33], atomic emission spectroscopy (AES) [34], chromatography [35], or mass spectrometry (MS) [36], but these methods are expensive and time-consuming, mainly due to the sample preparation [37]. On the other side, simple sensor devices based on changes of the optical absorption and/or fluorescence in the presence of heavy metal ions are highly desirable for the low costs and for the ease of use based on simple and portable UV-Vis spectrometer. Colloidal solutions of fluorescent metal NCs as sensors have been widely studied and used in laboratory facilities [38; 39; 40; 41; 42], but rarely employed for in situ detection. The solid-state sensors have many advantages with respect to the colloidal ones in terms of handling or mechanical stability. For instance, with a solid device it would be possible to map quickly and accurately a certain area; indeed, placing in contact directly the sensor with the contaminated place, avoiding sampling procedures and thus saving time. Some papers report the encapsulation of metal-nanomeraterials in solid matrices [43; 44; 45; 46; 47; 48], but only few report their exploitation for heavy metal ions detection purpose [49; 50; 51; 52; 53]. One of the most employed polymers for the synthesis of hydrogel matrix is the poly(ethylene glycol) PEG and its derivatives, due to their very simple way to make crosslinks after UV radiation exposure [54; 55].