NAME
GoogleAnalytics::Mobile::PSGI - Server-side PSGI application of Google Analytics for Mobile
SYNOPSIS
use WWW::GoogleAnalytics::Mobile::PSGI;
use Plack::Builder;
builder {
mount "/gam" => WWW::GoogleAnalytics::Mobile::PSGI->new(
secret => 'my very secret key',
timeout => 4,
);
};
DESCRIPTION
The server-side PSGI application of Google Analytics Mobile.
METHOD
- new
-
- secret
-
Secret key of checksum. Set same secret of WWW::GoogleAnalytics::Mobile
- timeout
-
Timeout second of request to Google.
OPTIMIZING
- proxy
-
Set environment value to use http proxy for accessing to Google.
my $app = WWW::GoogleAnalytics::Mobile::PSGI->new()->to_app; $app = sub { local $ENV{http_proxy} = 'http://172.0.0.3'; $app->(shift); };
- Cache DNS queries
-
WWW::GoogleAnalytics::Mobile::PSGI uses Furl::HTTP and Net::DNS::Lite for requesting to Google. You can cache DNS queries with Cache::LRU for more speed.
use WWW::GoogleAnalytics::Mobile::PSGI; use Cache::LRU; # setup cache for Net::DNS::Lite $Net::DNS::Lite::CACHE = Cache::LRU->new( size => 256, );
AUTHOR
Masahiro Nagano <kazeburo {at} gmail.com>
SEE ALSO
WWW::GoogleAnalytics::Mobile, http://code.google.com/intl/ja/mobile/analytics/
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.