Updated code to pass set id and api key through html data attribute instead of javascript.