[fix bug 1067324] Custom snippet metrics.

Nit: you could avoid re-querying the DOM twice by keeping a reference to `document.getElementById('snippet_set')`