This is 3rd and the final installment for Urchin 6 web analytics software series. Once Urchin is installed, you need to configure tracking on your website. You need to install Urchin sensors – a small piece of javascript tracking
code on each of your website’s pages. Usually all large site uses some sort of templating (themes) system.
Step # 1: Copy UTM files to webroot
You need to copy or softlink urchin.js and __utm.gif file to webroot from /usr/local/urchin/util/utm directory. If your webroot set at /home/lighttpd/cyberciti.biz/, enter:
# cp -v /usr/local/urchin/util/utm/* /home/lighttpd/cyberciti.biz/
Set appropriate file permissions:
# chown apache:apache /home/lighttpd/cyberciti.biz/urchin.js
# chown apache:apache /home/lighttpd/cyberciti.biz/__utm.gif
Step # 2: Add tracking HTML JS code in the HEAD section
On each page of your website, place the following tracking code right after the any META tags in the HEAD section:
<script src="/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _userv=0; urchinTracker(); </script>
Also make sure each website or profiles set to Urchin Traffic Monitor (UTM) as the visitor tracking method.
Step # 3: Make sure Apache logs data with cookies
You need to enable cookies in your Apache logging, add following code your httpd.conf file:
LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" urchin
Find your domain <VirtualHost> entry for which you wish to enable this new logging format. Deactivate any existing TransferLog or CustomLog entries within a . Then insert the following new CustomLog entry, replacing the string path_to_log with the appropriate path to your log location:
CustomLog /var/log/httpd/cyberciti.biz/access.log urchin
A note about lighttpd web server
If you are using Lighttpd add following code to you lighttpd.conf file:
accesslog.format = "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\""
Save and close web server configuration file. Restart the server:
# service httpd restart
OR
# service lighttpd restart
How do I view reports?
Login to your account by visiting urchin admin url:
https://your.server.com:9999/
Click the Go To Report button to the right of each Profile Name to launch the reporting window for that Profile. The reporting window will allow you to view all available reports for the Profile i.e. website. Here is a sample report:
Conclusion
This series has shown you how to install and configure Google Urchin 6 under Red Hat Enterprise Linux 5.x. I suggest reading following section for more information.
Further readings:
- Urchin 6 help pages
- Google Urchin 6 home page
🐧 6 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Can you please help me in Configuring Urchin6 for a intranet applications. My Application is using Apache Tomcat 6.0.10. I have deployed the application and its running and I want to know how to configure this with the Urchin6.
Please explain me in step by step, it will be of much help for beginners like me.
Thanks and regards,
Srikanth
You don’t need to have the javascript included when using Urchin.
Using only the log files works as well.
Or better yet, use webalizer and don’t put extra silly javascript in your site, incuring more bandwidth costs and slower page loads (fractional to be sure but still there)
I guess that access from southern Brazil that appears in image above is mine 🙂
awstats sucks, can just se one month as period.
Why would I install this application with a price so high? I can live with awstats!