GoogleAnalytics::Mobile::PSGI - Server-side PSGI application of Google Analytics for Mobile
use WWW::GoogleAnalytics::Mobile::PSGI; use Plack::Builder; builder { mount "/gam" => WWW::GoogleAnalytics::Mobile::PSGI->new( secret => 'my very secret key', timeout => 4, ); };
The server-side PSGI application of Google Analytics Mobile.
Secret key of checksum. Set same secret of WWW::GoogleAnalytics::Mobile
Timeout second of request to Google.
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); };
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, );
Masahiro Nagano <kazeburo {at} gmail.com>
WWW::GoogleAnalytics::Mobile, http://code.google.com/intl/ja/mobile/analytics/
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::GoogleAnalytics::Mobile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::GoogleAnalytics::Mobile
CPAN shell
perl -MCPAN -e shell install WWW::GoogleAnalytics::Mobile
For more information on module installation, please visit the detailed CPAN module installation guide.