Dashboard > blojsom > ... > Available Plugins > Referrer Log Plugin
  blojsom Log In   View a printable version of the current page.  
  Referrer Log Plugin
Added by David Czarnecki, last edited by David Czarnecki on Oct 21, 2004  (view change)
Labels: 
(None)

Description

The referrer plugin simply logs to a user defined file all of the HTTP referer headers it comes across. This is often useful if you want to see what google searches lead to your site. It will also group referrers by flavor with overall flavor totals and filtered by date. This plugin will also filter referrer's based on the contents of the blojsom wide blacklist filter.

Installation and Setup

In your global /WEB-INF/plugin.properties file, add the following line:

referer-log=org.blojsom.plugin.referer.RefererLogPlugin

You may then add "referer-log" to one of the flavor-based plugin chains. These plugin chains can be found in the individual user's plugin.properties file. For example:

html.blojsom-plugin-chain=referer-log

The referer plugin has its own configuration file, referer.properties, that is referenced in /WEB-INF/web.xml.

<init-param>
    <param-name>plugin-referer</param-name>
    <param-value>referer.properties</param-value>
</init-param>

The referer.properties file will be located in the respective /WEB-INF/(blog-id) directory and contains three configurable parameters:

#
# blojsom referer plugin configuration file
#
referer-display-size=40
referer-filename=/change/me/please/blojsom-referer.log

# NOTE:hit-count flavors just captures totals and not referer urls
hit-count-flavors=rss

referer-display-size controls the display size of the referer URL
referer-filename is the location and filename of the log file it should write to on shutdown of your application server
hit-count-flavors is a comma-separated list of the flavors that the plugin should track for referers. Flavors added to this list will only have their hit counts tracked, but will not have the referer URL tracked

Filtering

This plugin will use the contents of the blacklist filter to ignore referer's that match any of the filters. this helps ignore those spam referrers. This is automatic and no configuration, other that editing the blacklist.filters file.

Usage and URL Parameters

Context Attributes and Types

The following table describes the context attributes that are available and their associated type.

Context key Input or Output Type Description
REFERER_HISTORY Output org.blojsom.plugin.referer.BlogRefererGroup Manages the referer groups for the various flavors setup in referer.properties
REFERER_MAX_LENGTH Output java.lang.Integer Max length for referer URLs

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators