copy file PiwikTracker.php from piwik directory
libs/PiwikTracker/PiwikTracker.php
to yours tapatalk plugin
add on mobiquo/mobiquo.php
following lines before line with “exit”:
$idSite = 1;//set up your site id from piwik
$piwikUrl = ‘http://www.yourUrls.tld/piwikPath/’; //remember to update
$piwikToken = ‘123456’; //copy it from piwik site settings
$useragent = @$_SERVER[‘HTTP_USER_AGENT’];
$useragent = str_replace(“Mozilla/5.0 Firefox/3.5.6 Tapatalk/”, “Mozilla/5.0 Tapatalk/”, $useragent);
$remoteip = getenv(‘REMOTE_ADDR’);
$method = $context[‘mob_request’][‘method’];
require_once(‘./PiwikTracker.php’);
PiwikTracker::$URL = $piwikUrl;
$t = new PiwikTracker( $idSite, $piwikUrl);
$t->setCustomVariable( 1, frontend, tapatalk, visit );
$t->setCustomVariable( 3, Tapatalk, Tapatalk, visit );
$t->setUserAgent( $useragent );
$t->setBrowserHasCookies(true);
$t->setPlugins($flash = false, $java = false, $director = false);
if (!empty($remoteip)) { $t->setIp( $remoteip ); }
$t->setTokenAuth( $piwikToken );
$t->doTrackPageView( “On Tapatalk ” . $method );