由于 GTM 不支持 document.write() 方法,标准的 clicktale 代码不起作用。有解决方法吗?
ClickTale 员工向我发送了以下说明:
Replace the document.write JS line above with the following:
document.body.appendChild(externalScript);
Example:
<!-- ClickTale Bottom part -->
<script type='text/javascript'>
var externalScript = document.createElement('script');
var scrSrc = document.location.protocol=='https:'?
'https://clicktalecdn.sslcs.cdngc.net/':
'http://cdn.clicktale.net/';
scrSrc += 'www11/ptc/xxx-xxx-xxx-xxx.js';
externalScript.src = scrSrc;
externalScript.type = 'text/javascript';
document.body.appendChild(externalScript);
</script>
<!-- ClickTale end of Bottom part -->
我不知道该怎么办。有人尝试过这样的事情吗?