Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 13117

Re: Piwik and Tapatalk

$
0
0
I'm using Piwik 1.12

I use the tapatalk plugin (the last one) on a kunena forum (v.2) for a joomla (v.2.5) website


I followed all steps on this tutorial.
I tried to attach my new files UserAgentParser.php and UserSettings.php but I can't (I can copy the code of these files here if you want)

I have no error (any error_log file in folders).


This is the code in my mobiquo.php (wich is different for all forum we use with) :
<?php
require_once('mobiquoCommon.php');

MbqMain::init();  /* frame init */
MbqMain::input();     /* handle input data */
require_once(MBQ_PATH.'IncludeBeforeMbqAppEnv.php');
MbqMain::initAppEnv();    /* application environment init */
@ ob_start();
MbqMain::action();    /* main program handle */
MbqMain::beforeOutput();  /* do something before output */
MbqMain::output();    /* handle output data */



//Include the piwikTracker.class downloaded from piwik.org
require_once('PiwikTracker.php');
 
//Set the piwik-url
PiwikTracker::$URL = 'the_url_to_my_piwik';
 
//The site-id for this website
$piwikTracker = new PiwikTracker( $idSite = 2 );
 
//Piwik token auth (see piwik panel -> API)
$piwikTracker->setTokenAuth('myAPI');
 
//Set the user IP (if not set, server IP will be used)
$piwikTracker->setIp($_SERVER['REMOTE_ADDR']);
 
//Change the Tapatalk useragent
$version = str_replace('Mozilla/5.0 Firefox/3.5.6 ','',$_SERVER['HTTP_USER_AGENT']);
$piwikTracker->setUserAgent($version.' (Tapatalk) Tapatalk');
 
//Get the tapatalk function used and fire the tracking
$request_method_name = get_method_name();
$piwikTracker->doTrackPageView('Tapatalk - '.$request_method_name);

?>

All visits are registered on piwik except from tapatalk.

PiwikTracker.php is in the same folder than mobiquo.php


I tried to put api code before mobiquo code in mobiquo.php but there is an error and tapatalk app didn't work any more.

Do you need more informations for trying to help me?

Viewing all articles
Browse latest Browse all 13117

Trending Articles