Web&H5

初始化 SDK

将以下代码嵌入关键业务入口页面的 head 标签内

<script type="text/javascript">
	(function(){
		window._fmOpt = {
			partner: 'your partner',
			appName: 'your appName',
			success: function(data) {
				console.log('blackbox: ', data)
			}
		};
		var fm = document.createElement('script'); 
        fm.type = 'text/javascript'; fm.async = true;
		fm.src = 'Base URL' + '?t=' + (new Date().getTime()/3600000).toFixed(0);
        var s = document.getElementsByTagName('script')[0]; 
    s.parentNode.insertBefore(fm, s);
	})();
</script>

Base URL

获取SDK版本号

JS源文件获取

可以从JS源文件获取

/**
 * TrustDeviceJs Pro v3.8.11 - Copyright (c) TrustDeviceJs, Inc, 2024 (https://www.trustdecision.com/solutions/trustdevice)
*/

运行时代码获取

window._fmOpt.sdkVersion