I want to pass a {{contactId}} from my website to identify my logged in customers who take the typeform survey embedded into my page.
I embed videos through another company that provides this ability through the addition of a javascript snippet so am wondering if typeform allows for something similar? Here’s an example of the snippet currently installed.
<script defer>
setTimeout(()=> {
var params = {
custom_id: xxxxxxxx,
}
var queryString = Object.keys(params).map(function(key) {
return params[key] ? key + '=' + params[key] : ''
})
queryString = queryString.filter(Boolean).join("&")
if (queryString.length) {
frames = document.getElementsByTagName("iframe");
for (i = 0; i < frames.length; ++i) {
if (frames[i].src.includes("xxxxxx")) {
var url = frames[i].src + (frames[i].src.includes("?") ? "&"+queryString : "?"+queryString)
frames[i].src = url
}
}
}
})
</script>