Aims: We aim to better understand the emission of molecular tracers of the diffuse and dense gas in giant molecular clouds and the influence that metallicity, optical extinction, density, far-UV field, and star formation rate have on these tracers. Methods: Using the IRAM 30 m telescope, we detected HCN, HCO+, 12CO, and 13CO in six GMCs along the major axis of M 33 at a resolution of ~114 pc and out to a radial distance of 3.4 kpc. Optical, far-infrared, and submillimeter data from Herschel and other observatories complement these observations. To interpret the observed molecular line emission, we created two grids of models of photon-dominated regions, one for solar and one for M 33-type subsolar metallicity. Results: The observed HCO+/HCN...