VE-538: refactor dialog close button tracking; add nameToLabel utility func.