Get started with PHP-Fusion

Recommended Addons


FusionStats

Developed by : pattyland (Website)

Category : Site Analytics - Infusion

Publisher's Description

Integrate the web analytics platform Piwik in PHP-Fusion.

Detailed Screenshots

FusionStats

Editor's Review

by Falk on 08/10/2015

Great Addon!

Editor's Verdict

Total Score of (54/80)

3/5

Addon Uniqueness60%

Addon Size and Features30%

Addon Thoroughly tested and Established80%

Addon Versions Compatibility80%

Addon Type60%

Editors Opinion70%

Authors Fame Factor60%

Value for Money100%

Addon Rating is available to Members only.

Please login or register to vote.


A2 Hosting

Additional Information

Updated

October 08 2015 12:21:22

Author(s)

pattyland

Downloaded

635 Times

Copyright

Size

31.94 KB

Price

Free

Current Version

Version 1.3

Made for PHP-Fusion

v7.02

Translations

No Additional translations

Version Details

1.3, Downloaded 321 Times 1.2, Downloaded 158 Times 1.1, Downloaded 148 Times

Support Thread

FusionStats

Support for Infusions in the AddonDB

16 Replies 8,579 Views Last Updated on 2 years ago

pattyland


Junior Member

#1

Posted 2 years ago

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


Integrate the web analytics platform Piwik in PHP-Fusion.

-- View this Addon --

Posts: 23

Joined: 21/05/2013

Wanabo


Veteran Member

#2

Posted 2 years ago

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.

Posts: 504

Joined: 06/02/2006

pattyland


Junior Member

#3

Posted 2 years ago

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!

Posts: 23

Joined: 21/05/2013

Wanabo


Veteran Member

#4

Posted 2 years ago

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.
pHp-Fusion.Org, mods to enhance php-fusion.
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.

Posts: 504

Joined: 06/02/2006

Homdax


Fusioneer

#5

Posted 2 years ago

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

Posts: 2240

Joined: 24/01/2005

pattyland


Junior Member

#6

Posted 2 years ago

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.co...ot-blocker to ban a huge number before even accessing your page.

Download v1.1: https://github.co...s/tag/v1.1

Posts: 23

Joined: 21/05/2013

dimki


Senior Member

#7

Posted 2 years ago

in admin infusion no display, no lang, and error, in infusion install no display in list no install problem Sad

Posts: 271

Joined: 29/04/2011

pattyland


Junior Member

#8

Posted 2 years ago

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

Posts: 23

Joined: 21/05/2013

Wanabo


Veteran Member

#9

Posted 2 years ago

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.co...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.
pHp-Fusion.Org, mods to enhance php-fusion.
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.

Posts: 504

Joined: 06/02/2006

KasteR


Senior Member

#10

Posted 2 years ago

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:
Code Gist:

if (iGUEST) include INCLUDES."infusions_include.php";


I was logged in as Super Administrator (since I had to infuse), then receive this error:
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?
Code Gist:

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

Posts: 291

Joined: 14/07/2012

pattyland


Junior Member

#11

Posted 2 years ago

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

Posts: 23

Joined: 21/05/2013

bre2ake


Newbie

#12

Posted 2 years ago

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

Code Gist:

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

Posts: 1

Joined: 30/05/2015

mrijkhals


Junior Member

#13

Posted 2 years ago

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

Posts: 12

Joined: 29/08/2014

Falk


Super Admin

#14

Posted 2 years ago

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

Posts: 3825

Joined: 27/09/2005

tngweb


Junior Member

#15

Posted 2 years ago

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
Code Gist:


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


REPLACE it with
Code Gist:


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

Save and upload overwriting that file.
Edited by tngweb on 29-09-2015 00:46

Posts: 18

Joined: 18/09/2014

pattyland


Junior Member

#16

Posted 2 years ago

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 Wink

Posts: 23

Joined: 21/05/2013

pattyland


Junior Member

#17

Posted 2 years ago

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!

Posts: 23

Joined: 21/05/2013

Jump to Forum: