2015-08-13 102 views
1

我請以下 - (XXXXX代表我的實驗號),這裏所描述 - https://developers.google.com/analytics/devguides/collection/gajs/experiments#cxjs-loadcxApi.cxApi.getChosenVariation()只返回cxApi.NO_CHOSEN_VARIATION

<!-- Google analytics Experiment--> 
     <script src="//www.google-analytics.com/cx/api.js?experiment=XXXXX"></script> 

<script> 
    var variationExperiment = cxApi.chooseVariation('XXXXX'); 
    cxApi.setChosenVariation(variationExperiment,'XXXXX'); 
    console.log(variationExperiment); // gives 0 or 1 according the google decision 
    console.log(cxApi.getChosenVariation('XXXXX')); // always returns -1 , mean cxApi.NO_CHOSEN_VARIATION 
</script> 

console.log(cxApi.getChosenVariation('XXXXX'))只返回-1儘管我以前做cxApi.setChosenVariation(variationExperiment,'XXXXX')

它是什麼意思?我的谷歌分析加載是否成功?

回答