Advertisement
Guest User

Untitled

a guest
Oct 6th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement