How to pass IFTTT key,pin,state etc to ifttSettings on meeting a certain condtion(if condition) in a javascript function

function DetectFire()
var pinval=document.write(document.getElementById(‘output’).innerHTML);
if(pinval==“Pin Val = 0”)
//now i want to pass the applet key,pin, state here. Struck at this point


Please refer to above link. They will have predefined URLs that you can use and call from javaScript methods after replacing with you IFTTT api key and event etc.