Piwik with PHP Query -
since installed piwik last time - php query seams have changed. don't wont use javascript or image.
the last time code was
<?php require_once "piwik/piwiktracker.php"; $t = new piwiktracker( $idsite = 1, 'http://example.com/piwik/'); $t->settokenauth( 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ); $t->setip( $_server['remote_addr'] ); $t->dotrackpageview(get_page_clean_title(false)." — ". get_site_name(false)); ?>
this don't work new piwiktracker.php. tried find out how , ended code don't work...
since have in head of php file - site don't load.
<?php define('__root__', dirname(dirname(__file__))); require_once(__root__.'/piwik/piwiktracker.php'); $title = get_page_clean_title(false)." — ". get_site_name(false); piwiktracker::$url = 'http://example.com/piwik/'; $piwiktracker = new piwiktracker( $idsite = {2} ); $piwiktracker->dotrackpageview($title); ?>
check if piwiktracker.php
exists in given directory. far remember, php tracking library loaded via submodules , location may have changed.
Comments
Post a Comment