Piwik stats Download V1.0

This component/theme works with latest OSSN version.
French Eric F. 4 years ago

Add piwik to OSSN

Component to get piwik stats from your OSSN (https://github.com/opensource-socialnetwork/opensource-socialnetwork) site.

You need to get a Piwik (http://piwik.org/) site working.

Upload compoents and enble it. You can configure from the admin panel of OSSN, at letf topbar select configure and Piwik. Just put your domain name (OSSN) ex: toto.com and your site Id than you have in Piwik for your OSSN site.

Comments
German ~Z~ Man Replied 3 years ago

What's your problem Martin?
- You CAN configure this component from the Admin->Configure menu
- And the code IS inserted on every page

German Martin Korn Replied 3 years ago

You can make an update so you can enter the tracking code in the adminmenue and it is included on all pages

in Sathish kumar Replied 4 years ago

nice work eric . your are started editing code . Great to see lot of people creating plugins

French Eric F. Replied 4 years ago

Hi,

I've make test on js load, even if we put it on footer, it won't change much the DOMContentLoading time.
It'll appear at the end of source code but that's all.
Best will be to get a js file for the tracking code and loading it after the page loaded with script like I do for the jquery-ui.js
But I don't know how to write the 2 value in the js file and still searching :).
I don't know google analytics but may just need to change the code.

German Arsalan Shah Replied 4 years ago
ossn_extend_view('<name of view>', 'a path of file || function name');

To move the script in bottom of page you just need to change a line that ossnextendview to:

ossn_extend_view('ossn/page/footer','stats/pages/stats');
German Arsalan Shah Replied 4 years ago

You are doing great Eric, perhaps we can fork this component and create a google analytic.

German ~Z~ Man Replied 4 years ago

Take a look at the bottom of
/ossn/themes/default/plugins/default/theme/page/page.php

It seems, that 'ossnfetchextend_views()' is the counterpart of 'ossnextendview()'
Kind of a hook to insert additional stuff.... And since this is the bottom most hook we can find, simply change your PIWIK inserting point like ossnextendview('ossn/page/footer', 'stats/pages/stats');

Yeah, I'm convinced we would have a lot more modules if we had some documentation we could refer to. Right now, programming often feels like just guessing... :)

French Eric F. Replied 4 years ago

Hi Micha,

I know much that :) Problem is than I don't know how to put it at the end of body :).
Better will be after the load page as I make for the jquery-ui.js
My knowledge is poor, I'm just try to understand things & compare to built from a base :)

German ~Z~ Man Replied 4 years ago

Thanks Eric!

Just one note: To my experience it's better to insert that Piwik stuff at the bottom of body the section. Placing it in the head section can delay page rendering with slower servers.

Component

Developer: Eric
License GPL v2
Type: Tools
Ossn Version: 4.x
Latest Version: V1.0
Last Updated 4 years ago
Repository Url View Repository

Versions