MobileAnalytics-Plugin breaks Piwik 1.2


#1

Hey there,

if you install the MobileAnalytics-Plugin ( GitHub - kamermans/MobileAnalytics: Piwik plugin to track mobile visitors ) on Piwik 1.2, the system shows the following error on some widgets and piwik does not work anymore:

“SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘visitor_idcookie’ in ‘field list’”

Has anybody fixed that yet? I have not much time, otherwise I would look into this in detail.

Thanks in advance!

Best regards,
Johnny


#2

I think the field should be idvisitor now.


#3

Thanks for the answer! It seems to work if you change the following as you suggested:

/plugins/MobileAnalytics/MobileAnalytics.php


public function getMobileArrayInterestForLabel(&$archiveProcessing,$label){
$query = "SELECT 	$label as label,
count(distinct visitor_idcookie) as nb_uniq_visitors,
[...]

Change visitor_idcookie to idvisitor:


public function getMobileArrayInterestForLabel(&$archiveProcessing,$label){
$query = "SELECT 	$label as label,
count(distinct idvisitor) as nb_uniq_visitors,
[...]


#4

I guess it will take a while for plugin devs to catch up. I cannot take credit for this as somebody told me how to fix GeoIP which was the same issue :slight_smile: Glad you are sorted.