Loading...
 

Matomo Web analytics


"Matomo (formerlly known as Piwik) is a downloadable, open source (GPL licensed) real time web analytics software program. It provides you with detailed reports on your website visitors: the search engines and keywords they used, the language they speak, your popular pages… and so much more."
http://matomo.org/

Like Tiki, Matomo is written in PHP using a MySQL database.

To record visitors, visits and page views in Matomo, you must add a Tracking code in all your pages. Matomo recommend to use the standard JavaScript Tracking tag.

The documentation is here:
http://matomo.org/docs/javascript-tracking/

Copy the code from Matomo and paste in Admin -> Look & Feel -> General Layout or Customization (depends on your version of Tiki) -> Custom End of <body> Code surrounded by literal tags, as shown below:

In Tiki5 or newer
{literal}

<!-- Matomo-->
<script type="text/javascript">
...
...
...
</script>
<!-- End Matomo Tag -->

{/literal}


The literal tags indicate to the Smarty template engine not to interpret the code and to pass it as-is.

direct URL to access Custom End of <body> Code is: tiki-admin.php?page=look&cookietab=2


Only use the tracking code for users that do not have full admin rights
{if $tiki_p_admin neq 'y'}
 {literal}

  <!-- Matomo -->
  <script type="text/javascript">
   ...
   ...
   ...
  </script>
  <!-- End Matomo Tag -->

 {/literal}
{/if}

For better integration of Tiki with Matomo

To identify users logged into Tiki and track their activity, modify the default Matomo code to pass the Tiki username to Matomo . This is done by adding the following in Admin -> Look & Feel -> Custom End of <body> Code. Note that the Tiki username must be passed before 'trackPageView' in the default Matomo code to track user activity reliably.

Pass Tiki username to Matomo , see analytics of user activity in Matomo reports
{literal}
  <!-- Matomo -->
<script type="text/javascript">
...
...
...
{/literal}
{if $user}{literal}
  _paq.push(['setUserId', {/literal}'{$user}'{literal}]);{/literal}
{/if}{literal}
  _paq.push(['trackPageView']);
...
...
...
</script>
  <!-- End Matomo Tag -->
{/literal}

Matomo Visitor Log shows activity of Tiki user 'admin' in one session and an anonymous user in the session before that
Matomo Visitor Log shows activity of Tiki user 'admin' in one session and an anonymous user in the session before that


Embedding Matomo report on a Tiki Wiki page

It is possible to embed Matomo report into wiki page.

  • In Matomo Admin
    • Permission and User
    1. Go to setting, users.
    2. Set permission for anonymous so all the data will be public or create a specific user to create a token that will be used for authentication (recommended and explained here).
    3. In Manage Access give this user "View" permission for the website(s) you want the token to be used to share the report.
    • Report Selection and Credentials
    1. Click on the user icon (top right), select widget
    2. Select the kind of report you want to display and copy the HTML code found in the field "Embed Iframe" (at the bottom of the preview). Paste it in a text-editor.
    3. Add at the end of the "src" (it should start by "http://example.org...") the parameter to the API calls URLs that require authentication: "&token_auth=". Paste the token_auth you created for your specific user.

You have now all the necessary and basic code that should be placed in a Tiki Wiki page.

  • In Tiki
    1. Create or edit the page where you want to display the report.
    2. Set permission for your usage (it can be embedded inside group plugin for example).
    3. Insert an HTML plugin and paste the code you've prepared.
    4. Approve the plugin
    5. Tada !

Visits Summary, Visits Overview (with graph) for Doc.Tiki.org



Visitor Setting, Screen Resolution for Doc.Tiki.org



Actions, Pages for Doc.Tiki.org



Creating a Plugin for Tiki


Requirement

  1. Install on all page "JavaScript Tracking Code"
    <!-- Matomo-->
    <script type="text/javascript">
      var _paq = _paq || [];
      _paq.push(['trackPageView']);
      _paq.push(['enableLinkTracking']);
      (function() {
        var u="//domain_name/piwikwebsite_name/";
        _paq.push(['setTrackerUrl', u+'piwik.php']);
        _paq.push(['setSiteId', 1]);
        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
        g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
      })();
    </script>
    <noscript><p><img src="//localhost:8888/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
    <!-- End Piwik Code -->

    Installed at tiki-admin.php?page=look in the meantime


Notes:

(more to come...)

To-Do:

  • http vs https
  • Adding date range
  • Adding periods
  • Force height for specific widget
  • Set filtering and sort (&filter_sort_column=gt_ms)
  • Hide columns properly (&hideColumns=avg_time_on_page) set data to "-" but display the column.
  • Have the widget language set to Tiki language preferences.
  • Get 404 pages (http://piwik.org/faq/how-to/faq_60/)
  • Find is slow pages or slow query can be added to report
  • Verbose error (token hs or no server url error)
(more to come...)

Documentation available at : http://piwik.org/docs/embed-piwik-report/

See also Template Tricks

Related: Google Analytics


doc.tiki.org


Bootstrap

AdminGuide

UserGuide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC


Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki
Show php error messages