Được gửi bởi
Google Analytics
Cài đặt 1 ngày hiện 1 lần kiểu gì bạn?
Mình share code của mình qua cho các bạn sài nhé:
Code:
function Set_Cookie(name, value, expires, path, domain, secure) {
var today = new Date();
today.setTime(today.getTime());
var expires_date = new Date(today.getTime() + (expires));
document.cookie = name + "=" + escape(value) +
((expires) ? ";expires=" + expires_date.toGMTString() : "") +
((path) ? ";path=" + path : "") +
((domain) ? ";domain=" + domain : "") +
((secure) ? ";secure" : "");
}
function Get_Cookie(name) {
var start = document.cookie.indexOf(name + "=");
var len = start + name.length + 1;
if ((!start) &&
(name != document.cookie.substring(0, name.length))) {
return null;
}
if (start == -1) return null;
var end = document.cookie.indexOf(";", len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len, end));
}
if (Get_Cookie('yuhuads') == null) {
yuhuads="http://track.yuhuads.com/interstitial/572317e6ed6ef6271bac5d3f/"+((new Date()).getTime()) + Math.random();
document.write("<scr"+"ipt language='javascript' type='text/javascript' src='"+yuhuads+"'></scri"+"pt>");
Set_Cookie('yuhuads', 'yuhuads quang cao', '1', '/', '', '');
}
Các bạn chỉ cần thay cái
Code:
http://track.yuhuads.com/interstitial/572317e6ed6ef6271bac5d3f/
thành cái của các bạn là ok.
Bookmarks