So I have a page, in which i added the js code to get the typeform to pop up on screen after X seconds (see code below). Problem is, for people who already went on the page, the pop up shows black and empty, without any content in it. See this link ;https://drive.google.com/file/d/1saz9QC-0u1EoTm93KorgA2OIRoAgfCj5/view?usp=sharing
The code is as follow;
<div id="typeform" style="display:none;"></div>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const gclid = urlParams.get('gclid');
const kw = urlParams.get('kw');
const campaignid = urlParams.get('campaignid');
const adgroupid = urlParams.get('adgroupid');
document.getElementById("typeform").innerHTML = "<button data-tf-popup='Mr6eWKin' data-tf-open='time' data-tf-open-value='10000' data-tf-hidden='gclid=" + gclid + ",kw=" + kw + ",campaignid=" + campaignid + ",adgroupid=" + adgroupid + "' style='all:unset;font-family:Helvetica,Arial,sans-serif;display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#0445AF;color:#FFFFFF;font-size:20px;border-radius:25px;padding:0 33px;font-weight:bold;height:50px;cursor:pointer;line-height:50px;text-align:center;margin:0;text-decoration:none;'>Launch me</button>";
</script>
<script src="//embed.typeform.com/next/embed.js"></script>
Thanks for the help!!
Best answer by mathio
View original