我想給用戶一個片段,以便將自己的網站加載一個通用JavaScript文件併爲該用戶提供唯一的ID。這是如此加載的內容取決於哪個用戶ID與它相關聯。使用自定義UID加載通用腳本
我最好的猜測,到目前爲止是這樣的:
<script type="text/javascript">
var UID = '';
(function() {
var url = www.test.com/embed.js';
})();
</script>
<noscript>Please enable JavaScript to view this content</noscript>
<a href="http://www.test.com" class="link">content powered by <span class="logo">Test</span></a>
我還沒有有很多的運氣與此代碼。任何人都可以解釋我應該如何接近這個?
什麼是對每個用戶的唯一ID的目的是什麼? – user1477388
顯示由AJAX加載的不同內容 –