Loading...
 

Matomo Web analytics

Matomo, formerly known as Piwik, is a downloadable, Free (GPL licensed) web analytics software platform. It provides detailed reports on your website and its visitors, including the search engines and keywords they used, the language they speak, which pages they like, the files they download and so much more. Matomo (Piwik) aims to be an open source alternative to Google Analytics.


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

Integrating Matomo with Tiki

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
Copy to clipboard
{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
Copy to clipboard
{if $tiki_p_admin neq 'y'} {literal} <!-- Matomo --> <script type="text/javascript"> ... ... ... </script> <!-- End Matomo Tag --> {/literal} {/if}

Going Further

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
Copy to clipboard
{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 with Tiki user information

Matomo Visitor Log with Tiki user info
Matomo Visitor Log shows activity of Tiki user 'admin' in the first two sessions and an anonymous user in the session after that

Embedding Matomo report on a 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 (previous day)


Visitor Setting, Screen Resolution for doc.tiki.org (previous day)


Actions, Pages for doc.tiki.org (previous day)



See also Template Tricks

Related: Google Analytics

doc.tiki.org

Get Started

Admin Guide User Guide

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)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
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
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
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