Skip to content

Instantly share code, notes, and snippets.

@chrisst
Created December 12, 2012 22:34
Show Gist options
  • Save chrisst/4272284 to your computer and use it in GitHub Desktop.
Save chrisst/4272284 to your computer and use it in GitHub Desktop.
Truefit AB Test code
<script>
console.log('Truefit activation Promowell');
require([ 'order!jquery', ], function($) {
console.log('inside the require');
$.subscribe('load.truefit', function(context) {
// truefit loaded
console.log('Subscribing to truefit');
tfc.event('tfc-fitrec-product', 'render', function(context) {
// truefit rendered, activate AB test
console.log('activating truefit AB test');
window.optimizely = window.optimizely || [];
window.optimizely.push(["activate", 152385827]);
})
}, this)
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment