Gamification Notification Javascript

Version 2
    1. Needs to be added to a theme, the Jive Community places this in the footer.
    2. Note the 'APIKEY' portion, that would need to be filled in with your company API Key example: "s8dsfad2hdsfad12312"
    3. Not sure if both of these are needed, or just #1

     

    <script type="text/javascript">
    $j.fn.fireGameExtAction = function(element) {
      var token = $j(element).attr('token');
      if (!window._jive_current_user.anomymous && (typeof token !== "undefined")) {
      var nitro = new Nitro({
         apiKey : "APIKEY",
           server : "https://agm.nitro.bunchball.net/nitro/json",
           userId : window._jive_current_user.ID
        });
        nitro.callAPI("method=user.logAction&tags="+token,"nitro.showPendingNotifications");
      } // end if
    };
    </script>
    
    

     

     

     

    
    <script src="//assets.bunchball.net/scripts/nitro/current/nitro.js" type="text/javascript"></script>
    <script type="text/javascript">
        var nitro = new Nitro({
          apiKey : "APIKEY",
          server : "https://agm.nitro.bunchball.net/nitro/json",
          userId : window._jive_current_user.ID
        });
        nitro.showPendingNotifications();
    </script>