Hello, I have put into my updater:
But the custom variable is not tracker.
If somebody can help me.
Cheer,
Quote
<?php
require_once 'custom-function/PiwikTracker.php';
PiwikTracker::$URL = 'http://XXXXXXXXXXXXXXXX/';
$piwikTracker = new PiwikTracker( $idSite = 24 );
// Sends Tracker request via http
$ultimate=false;
if(preg_match('#ultimate#isU',$_SERVER['HTTP_USER_AGENT']))
$ultimate=true;
if($ultimate)
$piwikTracker->doTrackPageView('ultimate/'.$_GET['platform']);
else
$piwikTracker->doTrackPageView('normal/'.$_GET['platform']);
$piwikTracker->setTokenAuth('XXXXXXXXXXXXXXXXXXX');
$piwikTracker->setCustomVariable(1,'ultimate',$ultimate);
$piwikTracker->setCustomVariable(2,'platform',$_GET['platform']);
if(preg_match('#[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+#isU',$_SERVER['HTTP_USER_AGENT']))
$piwikTracker->setCustomVariable(3,'version',preg_replace('#^.*([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*$#isU','$1',$_SERVER['HTTP_USER_AGENT']));
if(preg_match('#\(OS: [^\\)]+\)#isU',$_SERVER['HTTP_USER_AGENT']))
$piwikTracker->setCustomVariable(4,'os',preg_replace('#^.*\(OS: ([^\\)]+)\)#isU','$1',$_SERVER['HTTP_USER_AGENT']));
But the custom variable is not tracker.
If somebody can help me.
Cheer,