Masahiro Nagano > WWW-GoogleAnalytics-Mobile-0.01 > WWW::GoogleAnalytics::Mobile

Download:
WWW-GoogleAnalytics-Mobile-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

WWW::GoogleAnalytics::Mobile - PSGI Application of Google Analytics for Mobile

SYNOPSIS ^

  use WWW::GoogleAnalytics::Mobile;

  my $gam = WWW::GoogleAnalytics::Mobile->new(
      secret => 'my very secret key',
      base_url => '/gam',
      account => 'ACCOUNT ID GOES HERE',
  );

  my $image_url = $gam->image_url($env);

  # in template
  <img src="[% image_url %]" />

  # server-side
  use WWW::GoogleAnalytics::Mobile::PSGI;
  use Plack::Builder;

  builder {
      mount "/gam" => WWW::GoogleAnalytics::Mobile::PSGI->new(
          secret => 'my very secret key',
          timeout => 4,
      );
      $app;
  };

DESCRIPTION ^

WWW::GoogleAnalytics::Mobile makes URI of Google Analytics of Mobile beacon that runs by WWW::GoogleAnalytics::Mobile::PSGI.

METHOD ^

new

Create instance of WWW::GoogleAnalytics::Mobile

base_url

Base URL of beacon image.

secret

Secret key of making checksum. Set same secret of WWW::GoogleAnalytics::Mobile::PSGI

account

Account ID of your Google Analytics ID.

image_url($env)

generate beacon image url. $env is PSGI env.

AUTHOR ^

Masahiro Nagano <kazeburo {at} gmail.com>

SEE ALSO ^

WWW::GoogleAnalytics::Mobile::PSGI, 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.

syntax highlighting: