TCCOC section 3-5 resources

Lecture slides section 3

Lecture slides section 4

Lecture slides section 5

Section 3 & 4

Section 5


Code (if these codes do not work for your website, check with a developer. He / she should be able to fix it with a minor adjustment)   

  • Place this code in your URL bar of your Chrome browser to place a cookie  (edit XXX as you like)


  • Google Analytics event to determine which variation your website visitor is in, place this at the end of your Javascript code (edit EVENT CATEGORY, ACTION and LABEL as you like)

//Google Analytics event for variation visitor is in
var variation = setInterval(function(){
  if ('undefined' != typeof ga) {
    ga('send', 'event', 'EVENT CATEGORY', 'ACTION', 'LABEL', {'nonInteraction': true});
  } }, 500 );

  • Hotjar poll or heatmap (edit NAME as you like)

//Hotjar code for poll or heatmap window.hj=window.hj||function(){(hj.q=hj.q||[]).push(arguments);};
hj('trigger', 'NAME');

In depth

vwo_$(' SELECTOR').click(function() {
  ga('send', 'event', 'CATEGORY', 'ACTION', 'LABEL', {'nonInteraction': true});