Totango Integration

To send information to Totango on events such as page views, content completions, and ecommerce purchases, just follow the following steps:

  1. Retrieve your Totango Replace with your Totango service code (tenant ID)
  2. Account Number. It looks like: SP-0000-00
  3. In Settings > Tracking Scripts, add the following scripts in the designated areas.

Header Scripts

Replace “SP-0000-00” below with your Totango service code retrieved in step 1.


<script type="text/javascript">
window.totango_options = {
service_id: "SP-0000-00"
};
(function() { var tracker_name=window.totango_options.tracker_name||"totango";window.totango_tmp_stack=[];window[tracker_name]={go:function(){return -1;},setAccountAttributes:function(){},identify:function(){},track:function(t,o,n,a){window.totango_tmp_stack.push({activity:t,module:o,org:n,user:a}); return -1;}}; var e = document.createElement('script'); e.type = 'text/javascript'; e.async = true; e.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'tracker.totango.com/totango3.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s); })();

</script>

Sending Ecommerce Order Events 

To send an event to Totango whenever an order is placed in Thought Industries, add the following script to "Order Confirmation Scripts":


<script>
if (window.totango) {
   window.totango_options = {
     service_id: window.totango_options.service_id,
     user: { 
       id: window.currentUser.email,
       name: window.currentUser.firstName + ' ' + window.currentUser.lastName
     }
  };
  totango.go(window.totango_options);
  totango.track("Order Confirmation", window.orderItems[0].title); 
}
</script>

Sending Content Completion Events 

To send an event to Totango whenever a course is completed in Thought Industries, add the following script to "Order Confirmation Scripts":


<script>
if (window.totango) {
  window.totango_options = {
    service_id: window.totango_options.service_id,
    user: { 
      id: '{{email}}',
      name: '{{firstName}} {{lastName}}'
    }
  };

  totango.go(window.totango_options);
  totango.track("Course Completion", "{{courseTitle}}"); 
}
</script>