The JVM driver for clickstream.io: captures users browsing sessions for servlets.
This is an alpha release, it is tested only with Spring 3 MVC.
In order to use, include the following in your
pom.xml file in <dependencies>
:
<dependency>
<groupId>io.clickstream</groupId>
<artifactId>driver</artifactId>
<version>0.3-SNAPSHOT</version>
</dependency>
web.xml file:
<filter>
<filter-name>Capture</filter-name>
<filter-class>
io.clickstream.driver
</filter-class>
<init-param>
<param-name>capture</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>api-key</param-name>
<param-value>YOUR API KEY</param-value>
</init-param>
<init-param>
<param-name>filter-params</param-name>
<param-value>password|credit_card</param-value>
</init-param>
<init-param>
<param-name>filter-uri</param-name>
<param-value>forbidden|\/admin</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Capture</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Parameters can also be set using context.xml
or environment variables
with the longer form: io.clickstream.io
+
parameter name.
Example with context.xml:
<Context>
<Parameter name="io.clickstream.capture" value="true"
override="false"/>
</Context>
The order in which the parameters are searched and return is:
- web.xml init params
- context.xml params
- environment variables
api-key
: the api key for authentication (mandatory)api-uri
: overwrite api uri endpointcapture
: set to true to collect data, defaultfalse
bench
: set to true to benchmark middleware overhead, defaultfalse
capture_crawlers
: set to true to capture hits from crawlers, defaultfalse
crawlers
: overwrite crawlers user agent regexfilter-params
: pipe separated strings of parameters to filter, defaultnull
e.g.password|credit_card
filter-uri
: pipe separated strings (regex) of uri for which not to capture data, defaultnull
e.g.forbidden|\/admin
Jerome Touffe-Blin, @jtblin, http://www.linkedin.com/in/jtblin
clickstream-jvm is copyright 2013 Jerome Touffe-Blin and contributors. It is licensed under the BSD license. See the include LICENSE file for details.