Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 6th, 2012  |  syntax: None  |  size: 0.89 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ## First, add the following function to the page's <head> section:
  2. <script type="text/javascript">
  3.   function recordCustomAndEvent(link, category, action, label, index, name, value, scope) {
  4.     _gat._getTrackerByName()._trackEvent(category, action, label);
  5.         _gat._getTrackerByName()._setCustomVar(index, name, value, scope);
  6.     setTimeout('document.location = "' + link.href + '"', 100);
  7.   }
  8. </script>
  9.  
  10. ## Current OLS Login Button
  11. <a id="ols-login" href="http://online.k12.com/login/"><img alt="OLS Login" src="/sites/all/themes/custom/k12/img/k12-corporate/ols-login.png"></a>
  12.  
  13. ## Modified OLS Login Button (sets custom segment on visitor)
  14. <a id="ols-login" href="http://online.k12.com/login/" onClick="recordCustomAndEvent(this, 'Interactions', 'Click', 'OLS', 1, 'User Type', 'Member', 1);return false;"><img alt="OLS Login" src="/sites/all/themes/custom/k12/img/k12-corporate/ols-login.png"></a>
clone this paste RAW Paste Data