Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

FusionStats

Did you find a way to count robots?
I've abandoned Piwik because it does not record any bots like google, yahoo, bing, etc. It only records search keywords.

For recording robots the Piwik API is necessary, but I could never get it to work.
Hi Wanabo, thanks for your comment. To be honest, I never noticed that Piwik doesn't count robots! I'm used to Google Analytics, but my last client wanted a self-hosted solution. I added a parameter to track advanced bots like Google etc, if it works I will update this plugin!
That would be great! I need to record (roque|spam) bots to block them from my sites.
I'll keep track of this thread to see if there will be any updates.
Please update when verified, I could use some local as well...
Just submitted v1.1 with Bot tracking and tracking of visitors without JavaScript enabled.It looks like this in the backend:
picload.org/image/igrcowi/screenshot2015-03-2322.54.06.png
picload.org/image/igrcoww/screenshot2015-03-2322.54.32.png

I doubt that this is helping you to prevent roque/spam... Bots doesn't need to send any infos about them like user agents to idenfity themselves, or they could even mimic Google or Bing. May you should use something like https://github.com/bluedragonz/bad-bo...ot-blocker to ban a huge number before even accessing your page.

Download v1.1: https://github.com/pattyland/FusionSt...s/tag/v1.1
in admin infusion no display, no lang, and error, in infusion install no display in list no install problem :(
Hi dimki, thanks for the error report. This could happen because GitHub puts the version in the name of the folder. I uploded a new version, please make sure that the folder you put in your infusion directory is called "fusionstats_panel"!

Quote

I doubt that this is helping you to prevent roque/spam... Bots doesn't need to send any infos about them like user agents to idenfity themselves, or they could even mimic Google or Bing. May you should use something like https://github.com/bluedragonz/bad-bo...ot-blocker to ban a huge number before even accessing your page.


I identify bots by the number of visits they make, then I investigate further. It helps to analyze their behavior to take countermeasures. This tactic has served me well. Besides that I block a lot of commercial site scrapers that sell my content to companies that use webcare to address customer problems. If they want my content they can pay for it.
pattyland, I'm big fan of your work with what you've developed over time for PHP-Fusion. I noticed one thing that gave me an error.

fusionstats_panel.php line 21:
CodeDownload  
if (iGUEST) include INCLUDES."infusions_include.php";



I was logged in as Super Administrator (since I had to infuse), then receive this error:

Quote

Fatal error: Call to undefined function get_settings() in /home/uxxxxxxxxx/public_html/infusions/fusionstats_panel/fusionstats_panel.php on line 21


Maybe this would be better?
CodeDownload  
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: fusionstats_panel.php
| Author: pattyland
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (iGUEST) { include INCLUDES."infusions_include.php";
$inf_settings = get_settings("fusionstats_panel");

echo "<!-- FusionStats -->";
echo '<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["appendToTrackingUrl", "bots=1"]);
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);
  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://'.preg_replace("(^https?://)", "", $inf_settings['url']).'/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", '.$inf_settings['site_id'].']);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="'.$inf_settings['url'].'/piwik.php?idsite='.$inf_settings['site_id'].'&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->';
}

?>



Very nice system by the way!
@KasteR: Thanks for the kind words! What a dumb error... I always had the shoutbox infusion there when I was admin, and not when I was a guest; So I never noticed this error. I fixed the including when you are not a guest and prevented double including when infusions_include.php is already included.

Just submitted v1.2, should be online soon!
Hello,

i am completly new with php-fusion.
I have installed the actual php-fusion and the FusionStats.
I have installed the actual piwik on an sub-domain too.
But when i will setting up the url and id from the piwik installed sub-domain i become an error in the adminmenu.

Here are the error: http://analytics.trenac.eu is not a valid Piwik installation!
And in the error-log´s i become the following message:
file_get_contents(http://analytics.trenac.eu/piwik.js): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request

CodeDownload  
Quelltext (Zeile: 77 - 97)
77   <?php
78   closetable();
79   
80   require_once THEMES."templates/footer.php";
81   
82   
83   function check_piwik_url($url) {
84   
85       if ($url == "/piwik.js") return true;
86   
87       $piwikcheck = file_get_contents($url);
88   
89       if (!$piwikcheck) return false;
90   
91       if (strpos($piwikcheck,'Piwik - Web Analytics') !== false) {
92           return true;
93       } else {
94           return false;
95       }
96   }
97   



What can i do to solve the problem?

thanks and best regards
@bre2ake, i have that problem to.

I have installed my fusion on "http://b2b.mrdairbrush.com"
I have installed my piwik in "http://b2b.mrdairbrush.com/piwik"

The only thing i get is "http://b2b.mrdairbrush.com/piwik" is not a valid Piwik installation!
Also: "piwikurl" is there in front of both the textboxes.
What i need to fill in in bex 1 and what i need to choose in box 2.
I am missing an installation guide....
Anyone help ?
Perhaps the Piwik have some issues with subdomains, try on a domain that is not a subdomain.
Like Domi said, sub folders/sub domains will not work properly. You need to setup a different site to be able to link your Fusion install with the Piwik install.

Box 1 is the URL to your Piwik installation.

Box 2 is the unique identifier for your site, IE 1, 2, 3......ETC.....

Maybe pattyland can fix that field???

In the meantime, if you edit the file fusionstats_panel_admin.php

FIND at line 64
CodeDownload  

   <label for="ps_site_id">Piwik URL</label>



REPLACE it with
CodeDownload  

   <label for="ps_site_id">Piwik Site ID</label>


Save and upload overwriting that file.
Thanks for the error reports!

Just submitted v1.3:
  • fixed the display error with the label for the Piwik Side ID
  • fixed the check for a valid installation, piwik changed their name so it failed. Now it's working with the old and the new version ;)

Quote

Like Domi said, sub folders/sub domains will not work properly. You need to setup a different site to be able to link your Fusion install with the Piwik install.


That's not correct! I have all my Piwik Installations on subdomains, and their are working great in general and with FusionStats!
Thread Information
Author
Replies
17 posts
Views
11,046 times
Last Post
Last updated on 4 years ago
Related Threads
FusionStats
Started by wheeler wheeler - 7 posts
FusionStats
Started by pattyland pattyland - 17 posts
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: Falk, Homdax, Wanabo, dimki, KasteR, pattyland, mrijkhals, tngweb, bre2ake