Conditionally include JS snippets

So we don't show a bad snippet if it the JS call doesn't exist in the config