function uliza_uuid(uuid, ad_type, tagid) { try { var user_agent = window.navigator.userAgent; var referrer = document.referrer; var script = document.createElement("script"); script.src = "http://ad-api-v01.uliza.jp/qc.php" + "?a=" + encodeURIComponent(user_agent) + "&r=" + encodeURIComponent(referrer) + "&u=" + uuid + "&t=" + ad_type + "&tagid=" + tagid; script.type = "text/javascript"; var head = document.getElementsByTagName("head"); head[0].appendChild(script); } catch (e) { console.log(e); } } function uliza_monitor_uuid() { if (window.top.ULIZA_UUID == null) { setTimeout(function() { uliza_monitor_uuid(); }, 200); return; } uliza_uuid(window.top.ULIZA_UUID, "", "2"); } function uliza_get_uuid() { try { var uuidURL = 'http://ad-api-v01.uliza.jp/' + 'uuid.php?type=js&callback=uliza.preview.getUUID'; var script = document.createElement("script"); script.src = uuidURL; script.type = "text/javascript"; var head = document.getElementsByTagName("head"); head[0].appendChild(script); } catch (e) { console.log(e); } } var uliza = uliza || this; uliza.preview = uliza.preview || {}; uliza.preview.getUUID = function(uuid, newFlg) { if (window.top.ULIZA_UUID == null) { window.top.ULIZA_UUID = uuid; window.top.ULIZA_UUID_NEW_FLG = newFlg; } } uliza_get_uuid(); uliza_monitor_uuid();