[Piwik-hackers] Writing to Visits table

Chris Songer csonger at gmail.com
Tue Jul 22 16:51:23 CEST 2008


I have started with a fresh install and am going to attempt to install
GeoIP. However the Plugin that I have created with all of the following
steps still doesn¹t seem to work. Could you elaborate on the firebug
response so that I can trace my error and report.


On 7/21/08 4:27 PM, "mikael letang" <mikael.letang at gmail.com> wrote:

> Hi Chris 
> 
> - Regarding GeoIP: You mean to say that once installed, it prevent data to be
> loggued? Did you install the last version?
> 
> - For your plugin: first, you can use the Provider plugin as a template. It is
> possible that the tutorial is not exactly up to date with the last
> architecture of Piwik.
> check that you did the following steps:
> -> in YourPlugin.php, in the getInformation() function you must specify that
> your plugin is loging stats in the $info array, which must contain
> 'LogStatsPlugin' => true,
> 
> -> in the install() function, you must alter the table log_visit
> 
> -> You can check with the firefox firebug plugin the response of the request
> done by your monitored website - if you see errors returned by that request,
> it may help. 
> 
> If you need more info on any of these steps just ask.
> 
> You can also send me your plugin and I may be able to check it out
> 
> Cheers, 
> 
> Mikael
> 
> 2008/7/22 Chris Songer <csonger at gmail.com>:
>> I have followed the tutorials on Advavnced using the GeoIP. The GeoIP for one
>> stops all data logging to piwik when activated. I have no idea. But I am
>> wanting to write a custom field that I pass in on an optional variable. Here
>> is the code I am using in my plugin.
>> 
>> function getListHooksRegistered()    {        $hooks = array(
>> 'LogStats.newVisitorInformation' => 'logMonkeyInfo'        );        return
>> $hooks;    }
>> 
>> function logMonkeyInfo($notification){                $visitorInfo =&
>> $notification->getNotificationObject();        $custom =
>> Piwik_Common::getRequestVar('vars',array(),'array');
>> $visitorInfo['monkey'] = $custom['monkey'];    }
>> ####################.php
>> 
>> <!-- Piwik --> <a href="http://piwik.org <http://piwik.org> " title="Open
>> source analytics" onclick="window.open(this.href);return(false);">    <script
>> type="text/javascript">        <!--        piwik_action_name = '';
>> piwik_idsite = 1;        piwik_url = 'http://127.0.0.1:8888/piwik/piwik.php';
>> //$.getJSON("server.php",function(json){document.data =
>> json['REMOTE_ADDR'];});        piwik_vars = { 'monkey':'<?=
>> $_SERVER['REMOTE_ADDR'] ?>'};         piwik_log(piwik_action_name,
>> piwik_idsite, piwik_url, piwik_vars);        //-->    </script>    <object>
>> <noscript>            <p>Open source analytics <img
>> src="http://127.0.0.1:8888/piwik/piwik.php" style="border:0"
>> alt="piwik"/></p>        </noscript>    </object> </a> <!-- /Piwik -->
>> ####################.js
>> 
>> Any help would be awesome. It is just not writing the data into the table.
>> Even if I replace the `$custom['monkey']` with a simple string `bananas`,
>> still nothing. 
>> 
>> _______________________________________________
>> Piwik-hackers mailing list
>> Piwik-hackers at piwik.org
>> http://lists.piwik.org/cgi-bin/mailman/listinfo/piwik-hackers
>> 
> 
> 
> 
> _______________________________________________
> Piwik-hackers mailing list
> Piwik-hackers at piwik.org
> http://lists.piwik.org/cgi-bin/mailman/listinfo/piwik-hackers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.piwik.org/pipermail/piwik-hackers/attachments/20080722/85d7649f/attachment.htm 


More information about the Piwik-hackers mailing list