New simple PIWIK tracker plugin

Developers
2014-02-27
2014-05-19
  • Pierre Cadéot
    Pierre Cadéot
    2014-02-27

    Hi everyone,

    This is my first attempt on improving the Piwik plugin, done by Cyril Kabache.

    But as for now, to avoid confusion, I called it "NicePiwik plugin" and it analyzes traffic on your posh site's tabs.

    The probe tracks tabs use and "username/tabname" is used to identify them (=name for the tracked pages).

    You'll just have to specify (in admin/plugin config) your piwik server url (only http supported as for now) and site id that can be found into your Piwik tracking code, {$PIWIK_URL} would be replaced by your Piwik URL and {$IDSITE} would be replaced by the idsite of the website you are tracking in Piwik :

    <!-- Piwik -->
    <script type="text/javascript">
      var _paq = _paq || [];
      _paq.push(["trackPageView"]);
      _paq.push(["enableLinkTracking"]);
    
      (function() {
        var u=(("https:" == document.location.protocol) ? "https" : "http") + "://***{$PIWIK_SERVER_URL}***/";
        _paq.push(["setTrackerUrl", u+"piwik.php"]);
        _paq.push(["setSiteId", "***{$PIWIK_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>
    <!-- End Piwik Code -->
    

    While open to suggestions I will continue to work on this to further understand what can by tracked and how, and improve the config interface to reflect that.

    My raw roadmap says I'll have to work on :
    - (understanding traffic analysis and...)
    - tieing posh user and piwik visitor (without tracking username for full privacy policy)
    - tracking widgets use and notebook events

    regards,
    Pierre

     
  • Pierre Cadéot
    Pierre Cadéot
    2014-02-27

    Here it is !

     
    Attachments
  • Thanks Pierre, I guess this will be useful for other Posh users. Can we add it to the posh next release ?

     
  • Pierre Cadéot
    Pierre Cadéot
    2014-03-03

    Thanks !
    Of course it can be added to the next release, but it depends on the release date, I plan to improve it in the next few weeks.. (more options in admin panel)

     
  • Thanks, just tell me when it can be added.

    Cheers

     
  • Pierre Cadéot
    Pierre Cadéot
    2014-03-21

    a little teasing on what's coming next ...

     
    Attachments
  • Thank you Pierre !

     
  • Pierre Cadéot
    Pierre Cadéot
    2014-03-24

    Well.. I guess I've been slightly ahead of myself... Setting the admin panel up before working on the real stuff.. In the end I can't find a way to track activity on widgets and notebook...

    About tracking widgets : tried registering call on app.widgets.create.end hook, but this gives not enough contextual data to work with, I would have use the widget name, and the content url - if iframe or rss feed - ... but those are ref'd by this.name, this.type, this.src... which I can't refer too :( or did I miss something ?

    About tracking notebook : no hook to register to, or I missed something here too...

    Anyway, it's about to be tab activity only, and delivery scheduled this week..
    Pierre

     
  • Pierre Cadéot
    Pierre Cadéot
    2014-03-31

    Here is the (for now) final and, at last, functional version !

    As I gave up on these, help would be much appreciated to find a way to track widgets and notebook actions...

    Besides that I'm open to suggestion for improvement.

    And, of course you may add it to your next release, I'd be honored.

    Take care,
    Pierre

    PS: Please remove the previous download as it was found slightly buggy... please remove as well, the previous screen cap which does not fit this release (Tabs analysis only) - then you may discard this footnote :)

     
  • Pierre Cadéot
    Pierre Cadéot
    2014-05-19

    Post awaiting moderation.