Temporary network failure

Our network service provider had a major network glitch this morning, rendering our servers inaccessible for about 5-10 minutes. We deeply apologize for the inconvenience, and are in talk with them to see how we can be better prepared for failures like this in the future. Note that since the monitus code is loaded asynchronously on your store, your pages still would have loaded normally, although in some browsers, the “loading wheel” indicator might have kept spinning. But the page’s content would have loaded fine, and other scripts would have run. The impact will be in your data (Google Analytics, Transaction Assist report, etc…) where you will be missing those 5-10 minutes’ worth of data.

Thank you for your patience and understanding.

GA callback function

For version 4, on all pages

<script type="text/javascript">
var monitus = monitus || {};
monitus.callback = function(pTrigger) {
    switch(pTrigger) {
        case "tracker_created":
            // The GA tracker has been created
            break;
        
        case "tracker_before_tracking":
            // Right before "_trackPageView" is called
            // appropriate for setting custom variables and content groups
            break;
        
        case "tracker_after_tracking":
            // After GA has tracked the current page view
            break;
        
        case "visitor_data_changed":
            // Called when the monitus.visitor data structure is updated with new values
            break;
        
        case "cart_setup":
            // Called when the cart recovery mechanism has been setup
            break;
    }
};
...
[regular monitus one-liner installaiton code]
</script>

For version 3.1 and earlier:

On non-checkout pages AND the confirmation page:

<script type="text/javascript">
  ...
  monitus_ga_callback = function(pStep, pTracker) {
   switch(pStep) {
    case "initialize":
      /*
      This step is for anything you want to do before the tracker is created; this should not be used to customize the tracker - use the "customize" case instead.
      ** pTracker is not used here.
      */
      break;
     
    case "customize":
      /*
      Customize the tracker object, before "_initData" is called on it.
      if you need to distinguish tracker objects (pqTracker, woTracker...) you can use the pTracker variable to compare, as in: if(pTracker == _MONITUS.pageTracker) { /*customize _MONITUS.pageTracker*/ }
      */
      break;
     
    case "finalize":
      /*
      In this step, the monitus pageview has been sent; note that on the confirmation page, the transaction has not been sent by this time.
      ** pTracker is not used here.
      */
      break;
     
    case "postprocess":
      /*
      This step happens at the very end of the GA coe - everything has been sent to GA.
      ** pTracker is not used here.
      */
      break;
   }
  }
  ...
  if(typeof(monitus_init) == "function") monitus_init(<store ID>, "new");
</script>


On the checkout wrapper page:

<script type="text/javascript">
  ...
  if(!document.URL.match(/sectionId=ysco.confirm/)) {
   monitus_ga_callback = function(pStep, pTracker) {
    switch(pStep) {
      case "initialize":
       /*
       This step is for anything you want to do before the tracker is created; this should not be used to customize the tracker - use the "customize" case instead.
       ** pTracker is not used here.
       */
       break;
      
      case "customize":
       /*
       Customize the tracker object, before "_initData" is called on it.
       if you need to distinguish tracker objects (pqTracker, woTracker...) you can use the pTracker variable to compare, as in: if(pTracker == _MONITUS.pageTracker) { /*customize _MONITUS.pageTracker*/ }
       */
       break;
      
      case "finalize":
       /*
       In this step, the monitus pageview has been sent; note that on the confirmation page, the transaction has not been sent by this time.
       ** pTracker is not used here.
       */
       break;
      
      case "postprocess":
       /*
       This step happens at the very end of the GA coe - everything has been sent to GA.
       ** pTracker is not used here.
       */
       break;
    }
   }
   ...
   if(typeof(monitus_init) == "function") monitus_init(<store ID>, "new");
  }
</script>