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

pattyland - Latest reply on 04-12-2018 15:42 by pattyland

0

pattyland
pattyland
www.php-fusion.co.uk/infusions/addondb/img/addon_logo.png


Integrate the web analytics platform Piwik in PHP-Fusion.



-- View this Addon --

Sort replies by

0

Wanabo
Wanabo
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.

0

pattyland
pattyland
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!

0

Wanabo
Wanabo
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.
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.

0

Homdax
Homdax
Please update when verified, I could use some local as well...

0

pattyland
pattyland
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

0

dimki
dimki
in admin infusion no display, no lang, and error, in infusion install no display in list no install problem :(

0

pattyland
pattyland
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"!

0

Wanabo
Wanabo

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.
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.

0

KasteR
KasteR
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:
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?
<?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!

0

pattyland
pattyland
@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!

0

B

bre2ake
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

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

0

M

mrijkhals
@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 ?

0

Falk
Falk
Perhaps the Piwik have some issues with subdomains, try on a domain that is not a subdomain.

0

tngweb
tngweb
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

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


REPLACE it with

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

Save and upload overwriting that file.
Edited by tngweb on 28-09-2015 22:46, 3 years ago

0

pattyland
pattyland
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 ;)

0

pattyland
pattyland

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!
Actions
You can view all discussion threads in this forum.
You can 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 cannot download attachments in this forum.
More topics like this
Participated Users

Moderators:
{%user_avatar%}

FusionStats
by {%user_profile_link%} {%post_date%}