6 Replies Latest reply on Jan 7, 2015 7:57 PM by david.bastedo

    URLs of public communities on cloud?


      Hello all - My colleague and i are wrestling with trying to get our Google Analytics to indicate when a member has signed in vs just a 'guest' browser. We had this in place sing the GA Classic script, but even then weren't fully confident we were getting the info. We moved to the cloud in early September, and over the last couple of weeks have implemented the GA Universal script (introduced a couple years ago). In this implementation, we have tried to put the correct variable and other elements in the script to record how much of our traffic logs in.

      We used some instruction found on this blog by another Jive customer (http://www.k-noo.net/2014/06/improve-jive-google-analytics-metrics-place-member-guest/752.). But this customer was on v6, not cloud, and it didn't work.  We tried other ideas, some of which worked for a bit but then broke.


      My partner in crime and more technical colleague (Ronan Feely) has implemented a new approach that seems to be working. That approach is a $( document ).ready(function() function on our page to catch the google analytics. As he says "Simple, but only if you know how."


      However, I would appreciate knowing how others who are in the cloud have solved this in GA. Have you used a different approach? And please share your url so I can View Source. Ours is communities.mentor.com.


      Of course, testing all this is dramatically more inefficient since Jive removed the ability for an admin to implement Third Party Analytics and one now has to go thru support. What a hassle......



        • Re: URLs of public communities on cloud?

          Hi Gordon - From my own testing and research it does not look like there is a JavaScript variable available for the GA code to reference that holds information about the user who is viewing a page. The page you linked references a variable that does not look valid anymore:


          var userID = jive.global._jive_effective_user_id;


          This very topic, and the ability to push user data into a service like Google Analytics, is something I have been looking into recently for our own Jive Knowledge Base. It would be worth posting over in Ideas for Jive requesting more functionality around what data can be referenced through third-party analytics - I suspect there are other community members who would also be interested in this.


          One note that I came across last year during my research was that there is a cookie present that holds information around whether someone is logged in. The cookie's name is "jive.user.loggedIn", which will be set to true if the user is logged in. I expect your developer may be able to check to see if this cookie is set to true and can push that out to GA.

            • Re: URLs of public communities on cloud?

              Thanks, David – I appreciate your response. I can virtually guarantee you that all Jive customers would like more ACCESS to the third party analytics via the admin console (like it used to be) and also more FUNCTIONALITY around it. Giving customers back their access to TPA thru the console is well documented in a couple different areas of the Jive customer community.


              Ronan has tried your below suggestion, and can better speak to the results. He will follow up with you I believe.



              • Re: URLs of public communities on cloud?

                David Bastedo,


                Can the footer access the Jive API?


                Could I do something like:


                var userID = '/api/core/v3/people/@me';

                var placeid = 'https://communities.mentor.com/api/core/v3/places/placeID';


                Then use userID and placeID in our GA script?



                  • Re: URLs of public communities on cloud?

                    I don't think that would be recommended or a viable solution - You would effectively be tripling the number of web requests your instance would be serving up, as each new page load would then trigger 2 new API calls. I expect the best approach would be to reference the JavaScript variables made available on the page itself.


                    Looking back at the variable found in the link Gordon posted, I think we can find the "_jive_effective_user_id" object in the "window" variable now instead of "jive.global". Example:


                    var userID = window._jive_effective_user_id

                    var placeid = jive.global.containerID


                    You also should keep in mind that the "container ID" is not unique to all places. For example, you may have a Project with a Container ID of 1000, and a Social Group with a container ID of 1000. Because of this, it may be best to combine both the Container ID and the Container Type, so that each Place in jive has a unique ID in your Google Analytics system.  You could try something like this:


                    var containerString = jive.global.containerType.toString() + ':' + jive.global.containerID.toString();


                    This is what we're doing in the Knowledge Base today and is touched on in Knowledge Base Implementation Guide