',
// PubCode from AdSense or DFP
PubCode: 'ca-dailysports_js',
// Height of Content Recommendation widget in pixels
CoReHeight: '200',
// Width of Content Recommendation widget in pixels
CoReWidth: '475',
// Height of Content Recommendation widget in pixels in a mobile viewport
mCoReHeight: '250',
// Width of Content Recommendation widget in pixels in a mobile viewport
mCoReWidth: '300',
// Type of Content Recommendation, possible values:
// 'title', 'image_with_title_overlay', 'image_with_title_underneath'
CoReType: 'image_with_title_overlay',
// Add HTML code of your current content recommendation solution
// or leave blank if you currently don't use one.
// 注意:以下のコードは newswatch の関連ニュースを呼び出すコードをDailyNewsサイトからコピーしました。
CurrentSolution: '',
// Traffic control
// Note: Sum of ExperimentTraffic and ControlTraffic can be less than 1,
// in such case, the remaining traffic will see no changes to the page.
// 0.1 = 10%, 0.5 = 50%, etc.
// 注意:以下のコードは A/Bテストの割合を指定しています。実際の運用時はそれぞれ 0.5, 0.5 に設定してください。
ExperimentTraffic: 0.5,
ControlTraffic: 0.5,
// Cookie name.
CookieName: 'google_mc_ab',
// 15 days (15*24*60*60*1000)
CookieDuration: 1296000000
};
// ---------------- Do NOT change code below this line. ------------------
GcrABTesting.commonCode = function() {
var ret = '
';
}
return "";
}
GcrABTesting.pick = function() {
var variation = GcrABTesting.getCookie(GcrABTesting.CookieName);
if (variation) {
// Get setting from cookie.
return parseInt(variation);
} else {
// Cookie is not set, randomly decide and set cookie.
var r = Math.random();
if (r < GcrABTesting.ExperimentTraffic) {
variation_index = 0;
} else if (r < GcrABTesting.ExperimentTraffic + GcrABTesting.ControlTraffic) {
variation_index = 1;
}
var d = new Date();
d.setTime(d.getTime()+GcrABTesting.CookieDuration);
document.cookie = GcrABTesting.CookieName + '=' + variation_index +
';' + 'expires=' + d.toGMTString();
return variation_index;
}
}
GcrABTesting.getCookie = function() {
var name = GcrABTesting.CookieName + '=';
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i].trim();
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}