Closed ratson closed 8 years ago
There are no limitations on GA. That branch was formed around Content Experiments rather than core event tracking. It will eventually use the Content Experiments API to choose the version to display, and report directly into the Content Experiment results. Unfortunately that will require server side work that extends beyond this project's current scope.
To record events using analytics.js you could do something like:
emitter.addPlayListener(function(experimentName, variantName){
ga('send', {
hitType: 'event',
eventCategory: experimentName,
eventAction: 'play',
eventLabel: variantName
});
});
If you're tracking wins you might add:
emitter.addWinListener(function(experimentName, variantName){
ga('send', {
hitType: 'event',
eventCategory: experimentName,
eventAction: 'win',
eventLabel: variantName
});
});
I see https://github.com/pushtell/react-ab-test/commit/fbd4c11e0f5b834caccca7fb047bb0c59c6fb035 moved GA related code to a branch.
Is there any limitations about GA for integration?