amazingsulabh has asked for the wisdom of the Perl Monks concerning the following question:

Hi All i had installed this module and while i am running code
#!/usr/bin/perl -w use strict; use WWW::Analytics::MultiTouch; my $username = 'sandeep@autoworldindia.com'; my $password = '*******'; my $analytics_id = '******'; #Simple, all-in-one approach # WWW::Analytics::MultiTouch->process(user => "$username", # pass => "$password", # id => "$analytics_id", # start_date => '2010-01-01', # end_date => '2010-02-01'); # Or step by step my $mt = WWW::Analytics::MultiTouch->new(user => $username, pass => $password, id => $analytics_id); $mt->get_data(start_date => '2012-01-01', end_date => '2012-05-20'); $mt->summarise(window_length => 45); $mt->report(filename => 'report-45day.xls'); $mt->summarise(window_length => 30); $mt->report(filename => 'report-30day.xls');

it is flashing this error msg Can't locate object method "data_feed" via package "Net::Google::Analytics" at /usr/lib/perl5/site_perl/5.8.8/WWW/Analytics/MultiTouch.pm line 95. I am also confused about "analytics_id" , plz make me sure for which id it is asking eg. profile id OR UA-25658907-1

Replies are listed 'Best First'.
Re: google analytics
by marto (Cardinal) on May 24, 2012 at 08:32 UTC

      Hmmm... in fact, looks like the original poster might be better served by installing an older version of Net::Google::Analytics! WWW::Analytics::MultiTouch was last updated 18 months ago, so likely relies on the older Net::Google::Analytics API.

      This is an example of why simply bumping the module's major version number is insufficient to protect people against major API changes.

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

        Nice catch!

Re: google analytics
by jack123 (Acolyte) on May 24, 2012 at 06:14 UTC
    I'll suggest for re installation of Net::Google::Analytics from CPAN site and also to check the dependencies for it : http://deps.cpantesters.org/?module=Net%3A%3AGoogle%3A%3AAnalytics%3A%3AFeed;perl=latest
      Yes I have installed "Net::Google::Analytics" and it is working fine in my another script please correct me about "analytics_id", what it exactly wants.?? Thanks for reply
        Actually analytic id is unique ID provided by google for every website. If you are using the google analytic code of any previous project in your new project then I'll request you to use new analytic id. For more refer: Google analytic code
Re: google analytics
by ansh batra (Friar) on May 24, 2012 at 06:17 UTC
    Have you installed Net::Google::Analytics?
      Yes i have installed
Re: google analytics
by ansh batra (Friar) on May 24, 2012 at 06:20 UTC
    Have you installed Net::Google::Analytics and all it's dependencies via CPAN shell?

      You posted this three minutes after asking Re: google analytics here. What's the rush? If you have something to add to your previous post please clearly mark it as updated then add the new stuff.

        I know I should have updated the same node. But I was accessing perl monks from my mobile so by mistake a new node was created.