我执行以下操作 - (XXXXX
代表我的实验 ID),如此处所述 - https://developers.google.com/analytics/devguides/collection/gajs/experiments#cxjs-load
<!-- 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')
。
它是什么指示?我的谷歌分析加载是否成功?