NAME

WWW::Tracking::Data - web tracking data object

SYNOPSIS

my $tracking_data = WWW::Tracking::Data->new(
	hostname           => 'example.com',
	request_uri        => '/path',
	remote_ip          => '1.2.3.4',
	user_agent         => 'SomeWebBrowser',
	referer            => 'http://search/?q=example',
	browser_language   => 'de-AT',
	timestamp          => 1314712280,
	java               => 0,
	encoding           => 'UTF-8',
	screen_color_depth => '24'
	screen_resolution  => '1024x768',
	flash_version      => '9.0',
	visitor_id         => '202cb962ac59075b964b07152d234b70',
);

DESCRIPTION

Simple data object for web tracking that allows plugins to add different serialization and deserialization methods. See WWW::Tracking::Data::Plugin::* namespace.

PROPERTIES

hostname
request_uri
remote_ip
user_agent
referer
browser_language
timestamp
java
encoding
screen_color_depth
screen_resolution
flash_version
visitor_id

METHODS

new()

Object constructor.

as_hash()

Clone the data and return as hash.

from_hash($data)

Create new WWW::Tracking::Data object from has hash. Adds current timestamp if not provided

as_*() and from_*()

These functions are injected into WWW::Tracking::Data namespace via plugins.

new_visitor_id()

Will generate new random visitor id and store it in visitor_id object property.

SEE ALSO

WWW::Tracking::Data::Plugin::* namespace.

AUTHOR

Jozef Kutej