Logging user's browser and version

Is it possible to log the user's web browser and the version of that browser in Confluence when they log in to the application? I'm not very familiar with detailed configuration of logging, so I would be grateful for any help or pointers.

The purpose is to identify those users still using old browsers (IE6) and get them upgraded.

4 answers

1 accepted

This widget could not be displayed.

Add the AccessLogValve to the configuration

open <app dir>\conf\server.xlm

Add the Valve setting inside server/service/engine/host/context section ie after the "logger is depreciated..." comment

<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in
confluence/WEB-INF/classes/log4j.properties -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="access." suffix=".log" pattern="combined" resolveHosts="false"/>

Save file and restart Confluence service

Creates access log files <app dir>\logs\access.yyyy-mm-dd.log

You need the "combined" pattern value to get the browser type. For less information use the value "common".

Tomcat doc ref: http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html

Note: This doesn't log a user id, just an ip address so you'd need to link in some othe data. Maybe the Tomcat layer doesn't know who's at the ip.

Excellent advice, thanks. I'll try to link the IP address to the user in one of the logs, thanks!

This widget could not be displayed.

There is a hack-and-slash method.

We use Google Analytics, and we embedded the javascript inside the "Custom HTML" under the Administration > Look and Feel section.

Advantages:

* Google Analytics does more than record browser usage,

* This solution only requires you to have Confluence administrative rights, and

* You don't need to hack and slash around Apache, so your IT team doesn't even have to know. :)

David Simpson Community Champion Jun 23, 2011
Be sure to remember that Google Analytics does not permit you to "collect personally identifiable information". For more details, check this section from the Analytics Plugins's "Occasionally Asked Questions" page: https://studio.plugins.atlassian.com/wiki/display/CGAP/Occasionally+Asked+Questions#OccasionallyAskedQuestions-CanGoogleAnalyticsalsotrackusernames%3F

Unfortunately Google Analytics won't work because we're sitting behind a firewall, but thanks for the suggestion.

This widget could not be displayed.
David Simpson Community Champion Jun 23, 2011

Is the purpose of this to collect usernames for your IT dept to do the upgrade? Or to alert users that their browser is out of date and therefore they need to upgrade their own browser?

With JavaScript, you could snoop for the browser features that are not supported and then

Having logged the image with username, you can then trawl the logs for users with outdated browsers.

Embed the JavaScript at the end of the BODY in

Administration | Look and Feel | Custom HTML

This widget could not be displayed.
Andrei [errno] Community Champion Jun 21, 2011

we configured Confluence / JIRA to sit behind Apache server acting as a proxy. If you use the same setup - collecting browser info is a trivial task of parsing access logs. (there are quite a few software packages that produce nice graphs (AWStats, for example)

Thanks webwesen, we have almost the same configuration, we've got the Apache server passing internet connections through to Confluence / Jira, but also have a F5 configured for intranet connection to the same instance of Confluence and Jira, so I think we really need to configure this on the Tomcat instance that Confluence is running on, otherwise we won't collect all of the internal connections, which make up the majority of users.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

155 views 2 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you