Google Web Site Optimiserがあるので、そちらを使えばいいのですが、 あえて、Google Analtyicsでやる事を考えようと思います。 用意するもの:
データ設定側:
if(document.cookie.search(/\|1\=ABTEST\=[AB]\=1/)!=-1){ _gaq.push(["_setCustomVar",1, (Math.random()>0.5 ? "A" : "B"),1]); }
_gaq.push(function(){ var p = _gat._getTracker("UA-xxxxx-xx"); if(p._getVisitorCustomVar(1) == "A"){ window["prm_txt"] = " PR: このblog本人からのお知らせ。勉強会の講師します。"; }else{ window["prm_txt"] = " PR: 勉強会の講師します。"; } $("<a style='color:red;' href='business'>"+ window["prm_txt"] +"</a>"). insertAfter("span.post-cat"). bind("click", function(){ p._trackEvent("ABTest", "click", document.location.pathname, Math.round((new Date()).getTime() -startTime)/1000))}); レポート側:
|
xその他 >