Case #179420: Grabbing the _jive_current_user displayname within an html widget


Description:


Hi Folks,

 

I have the need to insert the jive_current_user display name into a piece of tracker code within an html widget on our site so I can track real time stats and tie it to the authenticated user.

 

The javascript snippet is something like the snippet below and I am trying to understand what the proper way to populate the: GoSquared.UserName = "_jive_current_user.displayname"

 

<script type="text/javascript">

    var GoSquared={};

    GoSquared.acct = "GSN-***Edited***-K";

    GoSquared.UserName = "_jive_current_user";

    (function(w){

        function gs(){

            w._gstc_lt=+(new Date); var d=document;

            var g = d.createElement("script"); g.type = "text/javascript"; g.async = true; g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js";

            var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(g, s);

        }

        w.addEventListener?w.addEventListener("load",gs,false):w.attachEvent("onload",gs);

    })(window);

</script>

Latest Comment: Sep 12, 2012 11:33 AM by Robert DeArmond

Comments

More Like This